Created
August 14, 2014 15:24
-
-
Save srgvg/f29f9ec5d1ab37d89f27 to your computer and use it in GitHub Desktop.
Example playbook for ansible issue #8617
This file contains hidden or 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 | |
gather_facts: false | |
vars: | |
myvar: test | |
tasks: | |
- debug: msg={{myvar}} |
This file contains hidden or 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
--- | |
- include: logging.yml |
This file contains hidden or 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 logging.yml | |
PLAY [localhost] ************************************************************** | |
TASK: [debug msg=test] ******************************************************** | |
ok: [localhost] => { | |
"msg": "test" | |
} | |
PLAY RECAP ******************************************************************** | |
localhost : ok=1 changed=0 unreachable=0 failed=0 | |
$ ansible-playbook main.yml | |
PLAY [localhost] ************************************************************** | |
TASK: [debug msg={{myvar}}] *************************************************** | |
fatal: [localhost] => One or more undefined variables: 'myvar' is undefined | |
FATAL: all hosts have already failed -- aborting | |
PLAY RECAP ******************************************************************** | |
to retry, use: --limit @/home/serge/main.retry | |
localhost : ok=0 changed=0 unreachable=1 failed=0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment