Logging per playbook file

Hi all,

I just recently started using Ansible and really like it!

I’ve enabled the global logging directive in /etc/ansible/ansible.cfg, but I wonder if I can re-point where the log gets saved per playbook?

The setup I have currently is that I have a playbook folder with one playbook per folder, and I’d like that any errors etc get logged to a log-file in that particular folder instead of the global log-file.

Is this possible to achieve?
Maybe with a directive in each playbook?

Any pointers are appreciated.
Thanks.

//Sorin

I think the only way is to put a different ansible.cfg file in different directories pointing to the different locations. ansible should pick up the ansible.cfg in the current directory if it exists.

Ansible only picks up the first ansible.cfg found.

Thank you!
I’l look into that.