You might want to try with_sublements (
http://docs.ansible.com/playbooks_loops.html#looping-over-subelements) -
note the use of item.1 instead of just item:

- name: Add new servers to group for configuration
  local_action: add_host hostname={{item.1.public_dns_name}}
groupname={{ec2_groupname}}
  with_subelements:
    - ec2.results
    - instances
  when: ec2.changed



On Wed, Feb 11, 2015 at 11:45 AM, James Morgan <[email protected]>
wrote:

> Hi,
>
> Did you find a solution to this? Having a similar issue
>
> J
>
>
>  --
> 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/ee6699a9-c8dc-44b5-ac96-d262c8c39747%40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-project/ee6699a9-c8dc-44b5-ac96-d262c8c39747%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CAH%2BKTJ7%3DF4wzOi6pWY1PthgevGtaO%2BbTs%3DM6jQe3008X1NK7Qg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to