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.
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:
local_tmp = ~/.ansible/tmp
Ansible will then choose a random directory name inside this location.