Managing an ec2 instance after creation

24 views
Skip to first unread message

Maish Saidel-Keesing

unread,
Dec 28, 2016, 10:53:30 AM12/28/16
to Ansible Project
Good afternoon all.

I am trying to understand the flow of this will work - still not clear to me.

I would like to provision an ec2 instance with ansible.

Once that instance is created - I would like to continue to configure it using ansible directly - not through the ec2 modules.


Provisioning the instance is pretty straight forward. 
My question is how do I get the information retrieved from that play (for example the elastic IP address - assuming it has a public IP) and then use that further to configure the instance (as it is not possible to do that by passing all the information through user_data)  

Thanks in advance and happy holidays to you all!!


James

unread,
Dec 28, 2016, 1:21:16 PM12/28/16
to Ansible Project
Hi there

you can add the IP of the instance you created to a new group.


Then run the ansible tasks/roles you require against your newly created group.

Hope that helps.

James,
Reply all
Reply to author
Forward
0 new messages