if you debug that you will get the real result name, it may be something 
like ec2.results.instances or something like that. can you post the debug 
output of ec2 variable?

On Wednesday, April 26, 2017 at 12:25:27 AM UTC+5:30, balubhai555 wrote:
>
> Hello team,
>
> I want to 
>
>    1. Create AWS ec2 instance using one "*with_items: ec2"*
>    2. After that I want to insert the IP address of those instances into 
>    */etc/ansible/hosts*  file. For that I am using *local_action: 
>    lineinfile . *But after that I want to use again with_items: 
>    "{{ec2.instances}}"
>
>
> At that time it shows error, That Item is undefined.
>
> Are we use those with_items twice in a playbook. Any example please 
> suggest me. 
>
> Thank you in advance. 
>
>

-- 
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/9c9afa4c-db4e-4e88-aca7-aec8f5b05c8d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to