On 25.02.2019 14:46, [email protected] wrote:
> The issue was not so much with the quoting ( I tried that as well before
> posting ) but the value host_a after hostvars. Ansible was looking for the
> IP address under the host heading.
> Ex. {{ hostvars['x.x.x.x'][eth0] }}

Of course, is't a group name. 


> Is there another way to do this? I would prefer not to put the IP or a DNS
> name in the template so real values don't get checked into source code.

If you only have one host in the group this should work.

{{ hostvars[group['host_a'][0]]['eth0'] }}


-- 
Kai Stian Olstad

-- 
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 it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/0698195b-d023-9817-1185-7a7accf39608%40olstad.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to