Created
May 26, 2016 09:00
-
-
Save carlessanagustin/da6b15d6352e9a977f98ce43a5b92f89 to your computer and use it in GitHub Desktop.
Ansible - Working with inventory variables
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: 1st | |
tags: debug | |
debug: var=hostvars['{{ item }}']['ansible_eth1']['ipv4']['address'] | |
with_items: "{{ groups['master'] }}" | |
- name: 2nd | |
tags: debug | |
debug: var=hostvars['{{ item }}']['ansible_default_ipv4']['address'] | |
with_items: "{{ groups['master'] }}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment