What traces does Ansible leave on remote hosts and how can I remove them?

50 views
Skip to first unread message

Nick Kakouros

unread,
Jul 5, 2017, 6:54:11 PM7/5/17
to Ansible Project
I noticed that Ansible keeps a ~/.ansible directory. How can I delete it? Are there other traces of Ansible on the VM being configured?

Daniel JD

unread,
Jul 8, 2017, 8:19:18 AM7/8/17
to Ansible Project
Ansible should cleanup the files inside that folder. It should be empty! I dont know a way to completly remove it...
You could change the path to /tmp/.ansible and then it should automatically be cleaned by the OS (because /tmp is a tmpfs which is located in DRAM or if its a normal filesystem, by a systemd.timer).

Another thing you probably want to change, set no_logs to True:

no_logs: True

which prevents ansible to write the logs in syslog.

Daniel JD

unread,
Jul 8, 2017, 8:20:13 AM7/8/17
to Ansible Project
I forgot to tell you how to change that path :D

The option is the following:

remote_tmp
= ~/.ansible/tmp

Nick Kakouros

unread,
Jul 23, 2017, 11:26:09 AM7/23/17
to Ansible Project
Thanks for the info, I will try setting the path to /tmp/ansible.

Brian Coca

unread,
Jul 24, 2017, 9:53:41 AM7/24/17
to Ansible Project
The no_log setting might be too much as it obscures the info on the
controller also, there is another setting that specifically prevents
writing to syslog on the remote:

no_target_syslog = False


----------
Brian Coca
Reply all
Reply to author
Forward
0 new messages