# Ec2 Ami

**URL:** <https://forum.ansible.com/t/ec2-ami/20593>\
**Category:** Ansible Project\
**Created:** [February 16, 2016, 7:47pm UTC](https://forum.ansible.com/t/ec2-ami/20593 "2016-02-16T19:47:58Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jarren\_Oliphint](https://avatars.discourse-cdn.com/v4/letter/j/d6d6ee/32.png) [@Jarren\_Oliphint](https://forum.ansible.com/u/Jarren_Oliphint)\
**Post date:** [February 16, 2016, 7:47pm UTC](https://forum.ansible.com/t/ec2-ami/20593/1 "2016-02-16T19:47:58Z")

</div>

I am trying to create a simple playbook and having issues understanding the key value I need. Currently my goal is to do this.

1.) Get a list of instances either by a tag or running.  
2.) Register this list and gather the facts of the instances with the ec2\_remote\_facts module  
3.) Create an ami of all instances it finds with that tag or running  
4.) the name of the ami will need to be the private ip of instance.

Here Is my code so far, but can’t figure out the correct variables.

[http://pastebin.com/G78irCWH](http://pastebin.com/G78irCWH)

I apologize in advance if this not the correct place to ask this question.

---

<div class="post-metadata">

**Author:** ![Jarren\_Oliphint](https://avatars.discourse-cdn.com/v4/letter/j/d6d6ee/32.png) [@Jarren\_Oliphint](https://forum.ansible.com/u/Jarren_Oliphint)\
**Post date:** [February 17, 2016, 3:10pm UTC](https://forum.ansible.com/t/ec2-ami/20593/2 "2016-02-17T15:10:20Z")

</div>

I actually figured this out,
