Last active
May 11, 2017 04:25
-
-
Save dgarros/4a1ed0414c43b56ed9f19d683855142e to your computer and use it in GitHub Desktop.
Ansible Variable loading issue with Multiple inventory
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
- name: Print Variables | |
hosts: all | |
gather_facts: no | |
connection: local | |
tasks: | |
- name: Variables for dev_aaa | |
debug: var=hostvars['host_aaa'].myvar | |
- name: Variables for dev_bbb | |
debug: var=hostvars['host_bbb'].myvar | |
- name: Variables for dev_ccc (self) | |
debug: var=myvar |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment