Last active
July 20, 2017 08:28
-
-
Save kormat/56ef242aae3b7e77147688f9959d199d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- hosts: localhost | |
tasks: | |
- include: task1.yml | |
- include: task1.yml arg={{ blah|default(omit) }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ ansible-playbook omit_placeholder.yml -l localhost | |
PLAY [localhost] ***************************************************************************************************************************************************************************** | |
TASK [Gathering Facts] *********************************************************************************************************************************************************************** | |
ok: [localhost] | |
TASK [debug] ********************************************************************************************************************************************************************************* | |
ok: [localhost] => { | |
"msg": "task1 included" | |
} | |
TASK [debug] ********************************************************************************************************************************************************************************* | |
skipping: [localhost] | |
TASK [debug] ********************************************************************************************************************************************************************************* | |
ok: [localhost] => { | |
"msg": "task1 included" | |
} | |
TASK [debug] ********************************************************************************************************************************************************************************* | |
ok: [localhost] => { | |
"msg": "task2 included arg=__omit_place_holder__7623bf129fadd0e0233ebe365031ad078f31facd" | |
} | |
PLAY RECAP *********************************************************************************************************************************************************************************** | |
localhost : ok=4 changed=0 unreachable=0 failed=0 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- debug: msg="task1 included" | |
- include: task2.yml | |
when: arg is defined |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- debug: msg="task2 included arg={{arg}}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment