How do I record just what ansible is doing

54 views
Skip to first unread message

timfox123

unread,
Mar 4, 2017, 8:33:26 PM3/4/17
to Ansible Project

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 

Madhu

unread,
Mar 4, 2017, 9:02:49 PM3/4/17
to ansible...@googlegroups.com
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 received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+unsubscribe@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/296f68ff-559a-41a5-b09f-62217bc9f08e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Brian Coca

unread,
Mar 6, 2017, 11:12:58 AM3/6/17
to Ansible Project
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.
----------
Brian Coca

Spike

unread,
Mar 7, 2017, 10:17:34 AM3/7/17
to Ansible Project
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.


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

--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CACVha7f6r%3Dx2pXm3QKvFAp-5UJ%3DXkDgB-TVh6R%3DEoCyW%2BNo2QQ%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages