Created
September 25, 2013 16:30
-
-
Save tgerla/6702272 to your computer and use it in GitHub Desktop.
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: all | |
| vars: | |
| testvar: helloo | |
| tasks: | |
| - name: debug me | |
| debug: msg="{{ testvar }}" | |
| - debug: msg="{{ testvar }}" | |
| - name: a real command | |
| command: echo "{{ testvar }}" |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
[root@ansible tmp]# ansible-playbook -i hosts -l webserver1 test-vars.yml
PLAY [all] ********************************************************************
GATHERING FACTS ***************************************************************
ok: [webserver1]
TASK: [debug me] **************************************************************
ok: [webserver1] => {"msg": "helloo"}
TASK: [debug msg="helloo"] ****************************************************
ok: [webserver1] => {"msg": "helloo"}
TASK: [a real command] ********************************************************
changed: [webserver1]
PLAY RECAP ********************************************************************
webserver1 : ok=4 changed=1 unreachable=0 failed=0