Hi Team,

Need your help got stuck 

I want to use host vars from inventory for all host under a specific group

I tried with the below example but only getting IP when I am passing 
hostname not getting anything when trying to get ansbile_host variable 
value for all host under that group with the group name 

 ip: "{{hostvars['test']['ansible_host']}}"   ------Not working 
 ip: "{{hostvars['test1']['ansible_host']}}" -------- Working 


[test]
test1 ansible_host=1.1.1.1
test2 ansible_host=2.2.2.2

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-devel/d9876545-8ce1-4d68-afb3-b3e689218346n%40googlegroups.com.

Reply via email to