How do I record just what ansible is doing

writing scripts and trying them in a sandbox environment is one thing however …

If I run Ansible in a production environment and someone wants to know exactly what I have changes, they are going to want some kind of log or history of what the playbook has done.

How do I record just what ansible has done to each host ?

Regards

timfox123

You can mention the log_path= in the ansible.cfg file. The playbook run logs will be saved in the log file you mentioned.

You can use callbacks to log to a database/syslog/file/etc, some
existing plugins do this or you can add your own.

By default ansible logs any actions to the target's machine syslog/journal.

Tim,

just the other day I found this openstack’s project called Ara which you can use standalone and is basically what Brian was referring to, a callabck plugin. I haven’t tried it yet, but looks very promising, not just recording everything that happened, but also providing a very nice interface to review the changes.

https://github.com/openstack/ara

That said for my own setup I’m experimenting with rundeck which should be able to collect all the output along with providing access control to the jobs and a record of who initiated it.

best,

Spike