# ansible simplified log with date|host|playbook  ?

**URL:** <https://forum.ansible.com/t/ansible-simplified-log-with-date-host-playbook/16844>\
**Category:** Ansible Project\
**Created:** [November 21, 2014, 3:44pm UTC](https://forum.ansible.com/t/ansible-simplified-log-with-date-host-playbook/16844 "2014-11-21T15:44:48Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pablo\_Escobar](https://avatars.discourse-cdn.com/v4/letter/p/8797f3/32.png) [@Pablo\_Escobar](https://forum.ansible.com/u/Pablo_Escobar)\
**Post date:** [November 21, 2014, 3:44pm UTC](https://forum.ansible.com/t/ansible-simplified-log-with-date-host-playbook/16844/1 "2014-11-21T15:44:48Z")

</div>

Hi,

I have been writting some roles and playbooks before getting ansible in production. Now I have the most important stuff working (I hope) and I would like to generate a simple ansible log to keep track of what playbooks I apply to which hosts without deeper details.

I would like to have a log file in the ansible master machine in /var/logs/ansible/hosts/hostname.log with this format:

DATE | HOST | PATH\_TO\_APPLIED\_PLAYBOOK

Ideally I would like that the same log file is copied in the client machines when the playbook is executed.

I think the right approach would be to use a callback like this one [https://github.com/ansible/ansible/blob/devel/plugins/callbacks/log\_plays.py](https://github.com/ansible/ansible/blob/devel/plugins/callbacks/log_plays.py) but that one is giving too much information and I don’t know how to adapt it to print just the information I want.

is there any published callback doing this simplified ansible logging? or can anyone point to the right documentation I should check be able to adapt the log\_plays.py callback?

thanks in advance for your help  
Pablo.

---

<div class="post-metadata">

**Author:** ![Brian\_Coca](https://avatars.discourse-cdn.com/v4/letter/b/6de8d8/32.png) [@Brian\_Coca](https://forum.ansible.com/u/Brian_Coca)\
**Post date:** [November 21, 2014, 4:14pm UTC](https://forum.ansible.com/t/ansible-simplified-log-with-date-host-playbook/16844/2 "2014-11-21T16:14:30Z")

</div>

by default, ansible logs to syslog on the target host machines, you  
can also point to a file on the 'master' by setting the log\_path = in  
ansible.cfg.

you could also use a custom callback module to modify how things get  
logged on the master.
