I am running ansible on CentOS 6.8. This morning I ran yum update and got updated to a new version
Updating : ansible-2.2.1.0-1.el6.noarch
Unfortunately this appears to have broken my working ansible script. In particular, the task
- name: Gather info about consul servers
setup:
delegate_to: “{{item}}”
delegate_facts: True
when: “{{hostvars[item][‘ansible_default_ipv4’] is not defined}}”
with_items: “{{consul_servers}}”
while it runs commands against each of the three hosts defined in the list {{consul_servers}}, it only updates the hostvars for the first host. The second and third hosts are not set up with their associated ansible_* variables in hostvars.
This worked yesterday but not today.
First, is it possible that today’s update changed this behavior?
Second, is there a workaround - this functionality is critical for my script.
Peter