ansible ver=2.0.2

When I'm trying to add more than one host to a group its only adding the 
first one in the list.  Here is my task to add hosts:
- name: Add hosts group temporary inventory group
   add_host: name={{ item.private_ip }} groups=dynamic
   with_items: "{{ ec2.instances }}"

This task does use the ec2.instances properly and will do it for all the 
hosts that I have created:
- name: Wait for SSH
  wait_for:
      host: "{{ item.private_ip }}"
      port: 22
      delay: 10
      timeout: 320
      state: started
  with_items: "{{ ec2.instances }}"

So I'm creating 3 hosts and the add_host task only adds the first one but 
the wait for ssh task will wait for all three and I get an ok back for the 
wait for ssh task on all three.

-- 
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/4b863669-6398-4d2f-8022-d36029726ff2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to