By default Ansible sends output of the plays, tasks and module arguments to
STDOUT in the format that is not suitable for human reading.
Starting from Ansible 2.5, the default output format can be changed to a human-readable using the callback plugin.
This short note shows how to change the default Ansible’s
JSON output format to the more human-friendly
Cool Tip: Enable DEBUG mode and increase VERBOSITY in Ansible! Read more →
Ansible Output Format
To change the Ansible’s output format you can pass the
ANSIBLE_STDOUT_CALLBACK=yaml environment variable on the command line or define the
stdout_callback = yaml in Ansible configuration file.
Run a playbook and get the output in the human-readable format:
$ ANSIBLE_STDOUT_CALLBACK=yaml ansible-playbook playbook.yml
You can also define the
stdout_callback = yaml in
[defaults] # Human-readable output stdout_callback = yaml
Cool Tip: Ansible Playbook – Print Variable & List All Variables! Read more →
One Reply to “Ansible: Human-Readable Output Format”
You can also use a more friendly debug format, rather than the traditional debug.
I could get it creating the below include: