testing the sourcing of environmental variables
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
parent
1ba8a22363
commit
762b7195dc
3
.drone.env
Normal file
3
.drone.env
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
export ANSIBLE_LINT_EXCLUSION="--exclude collections/ansible_collections/ansible* --exclude collections/ansible_collections/community* --exclude .gitea"
|
||||||
|
export ANSIBLE_INVENTORY="-i 127.0.0.1, --connection=local"
|
||||||
|
export ANSIBLE_PLAYBOOK="baseos.yml"
|
15
.drone.yml
15
.drone.yml
@ -3,10 +3,6 @@ kind: pipeline
|
|||||||
type: docker
|
type: docker
|
||||||
name: CentOS_9-Ansible-Pipeline
|
name: CentOS_9-Ansible-Pipeline
|
||||||
|
|
||||||
environment:
|
|
||||||
ANSIBLE_INVENTORY : "-i 127.0.0.1, --connection=local"
|
|
||||||
ANSIBLE_PLAYBOOK : hello.yml
|
|
||||||
|
|
||||||
trigger:
|
trigger:
|
||||||
branch:
|
branch:
|
||||||
exclude:
|
exclude:
|
||||||
@ -14,12 +10,20 @@ trigger:
|
|||||||
event: [push]
|
event: [push]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
- name: "ansible_environment_setup"
|
||||||
|
image: gitea.thezengarden.net/podman/ansible-dev/centos9:release
|
||||||
|
commands:
|
||||||
|
- source .drone.env
|
||||||
|
|
||||||
- name: "ansible_environment_verify"
|
- name: "ansible_environment_verify"
|
||||||
image: gitea.thezengarden.net/podman/ansible-dev/centos9:release
|
image: gitea.thezengarden.net/podman/ansible-dev/centos9:release
|
||||||
commands:
|
commands:
|
||||||
- git log -1
|
- git log -1
|
||||||
- ansible --version
|
- ansible --version
|
||||||
- ansible-lint --version
|
- ansible-lint --version
|
||||||
|
- echo "ANSIBLE_LINT_EXCLUSION -> $ANSIBLE_LINT_EXCLUSION"
|
||||||
|
- echo "ANSIBLE_INVENTORY -> $ANSIBLE_INVENTORY"
|
||||||
|
- echo "ANSIBLE_PLAYBOOK -> $ANSIBLE_PLAYBOOK"
|
||||||
|
|
||||||
- name: "ansible_galaxy_requirements"
|
- name: "ansible_galaxy_requirements"
|
||||||
image: gitea.thezengarden.net/podman/ansible-dev/centos9:release
|
image: gitea.thezengarden.net/podman/ansible-dev/centos9:release
|
||||||
@ -29,10 +33,9 @@ steps:
|
|||||||
- name: "ansible_lint"
|
- name: "ansible_lint"
|
||||||
image: gitea.thezengarden.net/podman/ansible-dev/centos9:release
|
image: gitea.thezengarden.net/podman/ansible-dev/centos9:release
|
||||||
commands:
|
commands:
|
||||||
- ansible-lint --offline --exclude collections/ansible_collections
|
- ansible-lint --offline $ANSIBLE_LINT_EXCLUSION
|
||||||
|
|
||||||
- name: "ansible_playbook_execution"
|
- name: "ansible_playbook_execution"
|
||||||
image: gitea.thezengarden.net/podman/ansible-dev/centos9:release
|
image: gitea.thezengarden.net/podman/ansible-dev/centos9:release
|
||||||
commands:
|
commands:
|
||||||
- ansible-playbook -v $ANSIBLE_INVENTORY $ANSIBLE_PLAYBOOK
|
- ansible-playbook -v $ANSIBLE_INVENTORY $ANSIBLE_PLAYBOOK
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user