Skip to content

Instantly share code, notes, and snippets.

@philfry
Created April 19, 2017 10:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save philfry/8099cc98e12d7b36bf015dd856b2c3cb to your computer and use it in GitHub Desktop.
Save philfry/8099cc98e12d7b36bf015dd856b2c3cb to your computer and use it in GitHub Desktop.
include_role and meta dependencies with conditionals
Using /home/phil/projects/tmp/ansible-test/ansible.cfg as config file
Loading callback plugin default of type stdout, v2.0 from /usr/lib/python2.7/site-packages/ansible/plugins/callback/__init__.pyc
PLAYBOOK: bug.yml **************************************************************
1 plays in bug.yml
PLAY [localhost] ***************************************************************
META: ran handlers
TASK [dep1 : debug] ************************************************************
task path: /home/phil/projects/tmp/ansible-test/roles/dep1/tasks/main.yml:2
ok: [localhost] => {
"changed": false,
"msg": "in dep1"
}
TASK [dep2 : debug] ************************************************************
task path: /home/phil/projects/tmp/ansible-test/roles/dep2/tasks/main.yml:2
skipping: [localhost] => {
"changed": false,
"skip_reason": "Conditional result was False",
"skipped": true
}
TASK [dep3 : debug] ************************************************************
task path: /home/phil/projects/tmp/ansible-test/roles/dep3/tasks/main.yml:2
skipping: [localhost] => {
"changed": false,
"skip_reason": "Conditional result was False",
"skipped": true
}
META: ran handlers
META: ran handlers
PLAY RECAP *********************************************************************
localhost : ok=1 changed=0 unreachable=0 failed=0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment