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 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.