Ansible stdout Formatting

Question:

Assuming the below tasks:

I receive the below output:

How do I get the output to print as?

Ansible version is 2.4.2.

Thank you!

Answer:

There’s a new YAML callback plugin introduced with Ansible 2.5 — meaning any machine running Ansible 2.5.0 or later can automatically start using this format without installing custom plugins.

To use it, edit your ansible.cfg file (either global, in /etc/ansible/ansible.cfg, or a local one in your playbook/project), and add the following lines under the [defaults] section:

Now I can easily read through your output message

If you get the following error:

run

Leave a Reply