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/51e526a7-1ceb-4dbb-9399-21cf6938ab5d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to