Thanks, this is helpful.
As a matter of fact, one of my servers don't have an ipv4 address assign
to eth1, but does have an ansible_eth1 fact:
"ansible_eth1": {
"active": false,
"device": "eth1",
<snip>
},
I think I can use the active flag to prevent my template from crashing
for this server:
{% for host in groups['all'] %}
{% if hostvars[host]['ansible_eth1']['active'] %}
{{ hostvars[host]['ansible_eth1']['ipv4']['address'] }} {{ host }}
{% endif %}
{% endfor %}
Le 21/11/2014 18:20, Brian Coca a écrit :
> ansible server -m setup -i production, should provide you the correct info.
>
> I suspect one of your hosts does not have an ipv4 address assigned to eth1.
--
Jean-Philippe Caruana
http://www.barreverte.fr
--
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/54730ABA.5040601%40target2sell.com.
For more options, visit https://groups.google.com/d/optout.