How to print the logs of all ansible tasks of a playbook in RFC5424 format?

35 Views Asked by At

It is required to print the logs of all ansible tasks in a playbook in RFC5424 format. How can I do this?

1

There are 1 best solutions below

1
Alexander Pletnev On

Ansible output is controlled by the callback plugins. There is a number of built-in ones, including syslog_json, unixy or even diy that might help.

If none of the built-in plugins fits your requirements, you can always use a custom one (either found in some collection, or written by yourself).