# Managing an ec2 instance after creation

**URL:** <https://forum.ansible.com/t/managing-an-ec2-instance-after-creation/23334>\
**Category:** Ansible Project\
**Created:** [December 25, 2016, 2:58pm UTC](https://forum.ansible.com/t/managing-an-ec2-instance-after-creation/23334 "2016-12-25T14:58:23Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Maish\_Saidel-Keesing](https://avatars.discourse-cdn.com/v4/letter/m/5daacb/32.png) [@Maish\_Saidel-Keesing](https://forum.ansible.com/u/Maish_Saidel-Keesing)\
**Post date:** [December 25, 2016, 2:58pm UTC](https://forum.ansible.com/t/managing-an-ec2-instance-after-creation/23334/1 "2016-12-25T14:58:23Z")

</div>

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!!

---

<div class="post-metadata">

**Author:** ![James1](https://avatars.discourse-cdn.com/v4/letter/j/c67d28/32.png) [@James1](https://forum.ansible.com/u/James1)\
**Post date:** [December 28, 2016, 6:21pm UTC](https://forum.ansible.com/t/managing-an-ec2-instance-after-creation/23334/2 "2016-12-28T18:21:16Z")

</div>

Hi there

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

[http://docs.ansible.com/ansible/add\_host\_module.html](http://docs.ansible.com/ansible/add_host_module.html)

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

Hope that helps.

James,
