Created
September 4, 2013 16:54
-
-
Save jimi-c/6439723 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
# roles/test1/vars/main.yml | |
--- | |
test_rolevars: TEST1_ROLEVARS | |
# roles/test1/tasks/main.yml | |
--- | |
- debug: msg="testvar = {{ test_rolevars }}" | |
# roles/test2/vars/main.yml | |
--- | |
test_rolevars: TEST2_ROLEVARS | |
# roles/test2/tasks/main.yml | |
--- | |
- debug: msg="testvar = {{ test_rolevars }}" | |
$ ansible-playbook -i localhost, test.yml | |
PLAY [Test role defaults] ***************************************************** | |
GATHERING FACTS *************************************************************** | |
ok: [localhost] | |
TASK: [debug msg="testvar = TEST1_ROLEVARS"] ********************************** | |
ok: [localhost] => {"item": "", "msg": "testvar = TEST1_ROLEVARS"} | |
TASK: [debug msg="testvar = TEST2_ROLEVARS"] ********************************** | |
ok: [localhost] => {"item": "", "msg": "testvar = TEST2_ROLEVARS"} | |
PLAY RECAP ******************************************************************** | |
localhost : ok=3 changed=0 unreachable=0 failed=0 |
such
commented
Sep 4, 2013
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment