trying stuff
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Chris Hammer 2023-11-17 15:50:29 -05:00
parent 3a260ac16b
commit 59bfbf0c2b

View File

@ -2,20 +2,21 @@
global-variables: global-variables:
ansible_image: &ansible_image gitea.thezengarden.net/podman/images/ansible-dev:latest ansible_image: &ansible_image gitea.thezengarden.net/podman/images/ansible-dev:latest
name: run_ansible_tests name: run_ansible_tests
kind: pipeline kind: pipeline
type: docker type: docker
environment: environment:
ANSIBLE_DOCKER_IMAGE : gitea.thezengarden.net/podman/images/ansible-dev:latest
ANSIBLE_INVENTORY : "-i 127.0.0.1, --connection=local" ANSIBLE_INVENTORY : "-i 127.0.0.1, --connection=local"
ANSIBLE_PLAYBOOK : hello.yml ANSIBLE_PLAYBOOK : hello.yml
ANSIBLE_DOCKER_IMAGE : *ansible_image
steps: steps:
- name: "debug" - name: "debug"
image: gitea.thezengarden.net/podman/images/ansible-dev:latest image: *ansible_image
commands: commands:
- "echo \"image: $ANSIBLE_DOCKER_IMAGE - inventory: $ANSIBLE_INVENTORY - playbook: $ANSIBLE_PLAYBOOK\"" - "echo \"image: $ANSIBLE_DOCKER_IMAGE - inventory: $ANSIBLE_INVENTORY - playbook: $ANSIBLE_PLAYBOOK\""
when: when:
@ -37,7 +38,7 @@ steps:
- name: "ansible_galaxy_requirements" - name: "ansible_galaxy_requirements"
image: "$ANSIBLE_DOCKER_IMAGE" image: *ansible_image
commands: commands:
- ansible-galaxy install -r $DRONE_WORKSPACE/requirements.yml - ansible-galaxy install -r $DRONE_WORKSPACE/requirements.yml
when: when:
@ -47,7 +48,7 @@ steps:
- name: "ansible_lint" - name: "ansible_lint"
image: "$ANSIBLE_DOCKER_IMAGE" image: *ansible_image
commands: commands:
- ansible-lint --offline $DRONE_WORKSPACE - ansible-lint --offline $DRONE_WORKSPACE
when: when:
@ -57,10 +58,7 @@ steps:
- name: "ansible_playbook_execution" - name: "ansible_playbook_execution"
image: "$ANSIBLE_DOCKER_IMAGE" image: *ansible_image
environment:
ANSIBLE_INVENTORY:
from_secret: ansible_inventory
commands: commands:
- ansible-playbook -v $ANSIBLE_INVENTORY $DRONE_WORKSPACE/$ANSIBLE_PLAYBOOK - ansible-playbook -v $ANSIBLE_INVENTORY $DRONE_WORKSPACE/$ANSIBLE_PLAYBOOK
when: when: