# leftover on AMI after using Ansible with Packer

**URL:** <https://forum.ansible.com/t/leftover-on-ami-after-using-ansible-with-packer/30249>\
**Category:** Ansible Project\
**Tags:** azure, ubuntu, aws\
**Created:** [May 2, 2019, 4:54pm UTC](https://forum.ansible.com/t/leftover-on-ami-after-using-ansible-with-packer/30249 "2019-05-02T16:54:37Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Wawrzek\_Niewodniczan](https://avatars.discourse-cdn.com/v4/letter/w/bbe5ce/32.png) [@Wawrzek\_Niewodniczan](https://forum.ansible.com/u/Wawrzek_Niewodniczan)\
**Post date:** [May 2, 2019, 4:54pm UTC](https://forum.ansible.com/t/leftover-on-ami-after-using-ansible-with-packer/30249/1 "2019-05-02T16:54:37Z")

</div>

Hello,  
I use Ansible to configure OS which is base for Packer to create AMI  
for AWS and disk image for Azure. AMI bases on Amazon Linux and Azure  
image on Ubuntu image. The whole process works fine, however somehow  
on AMI in /home/ec2-user there is (an empty) ~wawrzek/.ansible/tmp  
directory. 'wawrzek' is a name of the user triggering packer +ansible  
task. Azure is OK.

Any idea what might be wrong?

Wawrzek

---

<div class="post-metadata">

**Author:** ![Tchia04](https://avatars.discourse-cdn.com/v4/letter/t/fbc32d/32.png) [@Tchia04](https://forum.ansible.com/u/Tchia04)\
**Post date:** [May 4, 2019, 2:11pm UTC](https://forum.ansible.com/t/leftover-on-ami-after-using-ansible-with-packer/30249/2 "2019-05-04T14:11:03Z")

</div>

That folder is a temporally folder used by ansible. See the following for more details

[https://docs.ansible.com/ansible/2.4/intro\_configuration.html](https://docs.ansible.com/ansible/2.4/intro_configuration.html)

#### [local\_tmp](https://docs.ansible.com/ansible/2.4/intro_configuration.html#id120)

New in version 2.1.

When Ansible gets ready to send a module to a remote machine it usually has to add a few things to the module: Some boilerplate code, the module’s parameters, and a few constants from the config file. This combination of things gets stored in a temporary file until ansible exits and cleans up after itself. The default location is a subdirectory of the user’s home directory. If you’d like to change that, you can do so by altering this setting:

```auto
local_tmp = ~/.ansible/tmp

```

Ansible will then choose a random directory name inside this location.
