This commit is contained in:
parent
3a260ac16b
commit
59bfbf0c2b
14
.drone.yml
14
.drone.yml
@ -2,20 +2,21 @@
|
||||
global-variables:
|
||||
ansible_image: &ansible_image gitea.thezengarden.net/podman/images/ansible-dev:latest
|
||||
|
||||
|
||||
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
|
||||
ANSIBLE_DOCKER_IMAGE : *ansible_image
|
||||
|
||||
|
||||
steps:
|
||||
- name: "debug"
|
||||
image: gitea.thezengarden.net/podman/images/ansible-dev:latest
|
||||
image: *ansible_image
|
||||
commands:
|
||||
- "echo \"image: $ANSIBLE_DOCKER_IMAGE - inventory: $ANSIBLE_INVENTORY - playbook: $ANSIBLE_PLAYBOOK\""
|
||||
when:
|
||||
@ -37,7 +38,7 @@ steps:
|
||||
|
||||
|
||||
- name: "ansible_galaxy_requirements"
|
||||
image: "$ANSIBLE_DOCKER_IMAGE"
|
||||
image: *ansible_image
|
||||
commands:
|
||||
- ansible-galaxy install -r $DRONE_WORKSPACE/requirements.yml
|
||||
when:
|
||||
@ -47,7 +48,7 @@ steps:
|
||||
|
||||
|
||||
- name: "ansible_lint"
|
||||
image: "$ANSIBLE_DOCKER_IMAGE"
|
||||
image: *ansible_image
|
||||
commands:
|
||||
- ansible-lint --offline $DRONE_WORKSPACE
|
||||
when:
|
||||
@ -57,10 +58,7 @@ steps:
|
||||
|
||||
|
||||
- name: "ansible_playbook_execution"
|
||||
image: "$ANSIBLE_DOCKER_IMAGE"
|
||||
environment:
|
||||
ANSIBLE_INVENTORY:
|
||||
from_secret: ansible_inventory
|
||||
image: *ansible_image
|
||||
commands:
|
||||
- ansible-playbook -v $ANSIBLE_INVENTORY $DRONE_WORKSPACE/$ANSIBLE_PLAYBOOK
|
||||
when:
|
||||
|
Loading…
x
Reference in New Issue
Block a user