ansible-playbook redirect

Hi folks,

when I use “ansible-playbook -i ” I could’t redirect the output. Why?

ansible-playbook -i > log.txt

I will capture the consolen output and send this output to another app. I can capture the STDOUT traffic from other App (“LS” and so on)
but not from Ansible. Is there configution option for ansible?

Klemens

No, that should capture stdout, but ansible also prints to stderr.

In any case Ansible has 'callback plugins' which are meant to export
that data to 3rd parties.

https://docs.ansible.com/ansible/latest/plugins/callback.html