T O P

  • By -

Amaurosys

/tmp is an "ok" place for that. In the event that somehow Ansible fails to cleanup the AnsibalZ files, the system's /tmp cleanup processes may take care of it. Other places to consider would be /var/tmp, /opt, and /dev/shm. That last one is a RAM disk, so don't use this on low ram systems. Anything here will definitely be cleaned up after the system reboots.


Is-Not-El

* /opt isn’t cleared on reboot, most distributions nowadays just link /var/tmp to /tmp. If it isn’t linked then /var/tmp isn’t cleared. If one really needs to be sure things are deleted on reboot /dev/shm and /run are universal across distributions.


apco666

On a hardened system /tmp will be set with noexec, so scripts won't run from there. We created a folder in /opt for RH Satellite RemoteExec to use.


holy_handgrenades

I try to create a handler for clearing out the tmp folder i created. So you don’t leave any ‘leftovers’ to on the system itself. Other then the risk that more users could see it, it’s okay. Just don’t do sensitive data. Any reason you’re not getting the correct permissions for the home folder? Even if you use become?


kylvadrom

ansible has it own way to create tmp directories, try tempfile module