Below is working when I was still using ansible 2.3 or maybe 2.7 But no 
longer ansible 2.8 or 2.9. Please be advise no matter what it is not 
working.
Thanks

{% for host in groups.all  %}
{{ hostvars[host]['ansible_all_ipv4_addresses'][0] }} {{ 
hostvars[host]['ansible_fqdn'] }} {{ 
hostvars[host]['inventory_hostname_short'] }}
{% endfor %}

Below is the actual error.

FAILED! => {"changed": false, "msg": "AnsibleUndefinedVariable: 
'ansible.vars.hostvars.HostVarsVars object' has no attribute 
'ansible_all_ipv4_addresses'"}

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/0bc08e12-07aa-4df5-854c-4bcba9324605n%40googlegroups.com.

Reply via email to