Hi,
We are running Ansible 1.2.3 on CentOS 6.4 but we’re hitting an odd problem when trying to access variables within a group. We have a snippet of code like this;
{% for item in groups[‘target_group’] %}
{{ item }} : {{ hostvars[item] }}
{% endfor %}
When we run that from the build server against two servers in the group it lists the custom hostvars in addition to the ansible_* hostvars on the first server but the dictionary for the second server only contains custom entries, which prevents us from accessing the IP address of the second server from the first. When I run ansible -m setup against the two servers in the group from the build server it does return a complete JSON doc with the interfaces listed with their IP addresses.
Seeing as this is mentioned in http://www.ansibleworks.com/docs/playbooks2.html I assume there is something obvious that we are doing wrong but I’ve looked through the documentation and I can’t see the issue. Have I missed something?
Graham