Skip to content

Instantly share code, notes, and snippets.

@dgarros
Last active May 11, 2017 04:25
Show Gist options
  • Save dgarros/4a1ed0414c43b56ed9f19d683855142e to your computer and use it in GitHub Desktop.
Save dgarros/4a1ed0414c43b56ed9f19d683855142e to your computer and use it in GitHub Desktop.
Ansible Variable loading issue with Multiple inventory
- 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