fix hello.yml; .drone-ci.yml refinements
Some checks reported errors
continuous-integration/drone/push Build encountered an error

This commit is contained in:
Chris Hammer 2023-11-17 15:34:20 -05:00
parent 3a02d1d9bd
commit 2ed92a0eda
2 changed files with 17 additions and 19 deletions

View File

@ -1,12 +1,18 @@
---
name: Ansible Playbook Lint and Test Execution
name: run_ansible_tests
kind: pipeline
type: docker
environment:
ANSIBLE_DOCKER_IMAGE : gitea.thezengarden.net/podman/images/ansible-dev:latest
ANSIBLE_INVENTORY : "-i 127.0.0.1, --connection=local"
ANSIBLE_PLAYBOOK : hello.yml
steps:
- name: "Verify environment"
image: gitea.thezengarden.net/podman/images/ansible-dev:latest
- name: "ansible_environment_verify"
image: "$ANSIBLE_DOCKER_IMAGE"
commands:
- git log -1
- ansible --version
@ -17,13 +23,8 @@ steps:
event: [push]
###############################################################################
###############################################################################
###############################################################################
- name: "Ansible-Galaxy: Install from requirements.yml"
image: gitea.thezengarden.net/podman/images/ansible-dev:latest
- name: "ansible_galaxy_requirements"
image: "$ANSIBLE_DOCKER_IMAGE"
commands:
- ansible-galaxy install -r $DRONE_WORKSPACE/requirements.yml
when:
@ -32,8 +33,8 @@ steps:
event: [push]
- name: "Syntax check and Ansible Lint"
image: gitea.thezengarden.net/podman/images/ansible-dev:latest
- name: "ansible_lint"
image: "$ANSIBLE_DOCKER_IMAGE"
commands:
- ansible-lint --offline $DRONE_WORKSPACE
when:
@ -42,13 +43,13 @@ steps:
event: [push]
- name: "Test playbook execution"
image: gitea.thezengarden.net/podman/images/ansible-dev:latest
- name: "ansible_playbook_execution"
image: "$ANSIBLE_DOCKER_IMAGE"
environment:
ANSIBLE_INVENTORY:
from_secret: ansible_inventory
commands:
- ansible-playbook -v -i 127.0.0.1, --connection=local $DRONE_WORKSPACE/hello.yml
- ansible-playbook -v $ANSIBLE_INVENTORY $DRONE_WORKSPACE/$ANSIBLE_PLAYBOOK
when:
branch:
- development

View File

@ -1,11 +1,8 @@
- name: Hello world
hosts: localhost
connection: local
hosts: all
become: false
gather_facts: false
bob:
- is great
tasks:
- name: Say Hello world