[ansible-project] Re: How to choose between ansible_eth0 and ansible_eth1 depending on a parameter?

2015-06-18 Thread Anand Buddhdev
Hi Yassen, You have to use the hostvars dictionary, like this: {{ hostvars[inventory_hostname]['ansible_'+ext_if].ipv4.address }} -- You received this message because you are subscribed to the Google Groups Ansible Project group. To unsubscribe from this group and stop receiving emails from

[ansible-project] Re: How to choose between ansible_eth0 and ansible_eth1 depending on a parameter?

2015-06-18 Thread Yassen Damyanov
On Thursday, June 18, 2015 at 8:02:20 PM UTC+3, Anand Buddhdev wrote: Hi Yassen, You have to use the hostvars dictionary, like this: {{ hostvars[inventory_hostname]['ansible_'+ext_if].ipv4.address }} *Anand*: you nailed it, works great! Thank you! -Y. -- You received this message