Playbook logging and verbosity
Increasing the verbosity of Ansible output can solve many problems. From invalid module arguments to incorrect connection commands, increased verbosity can be critical to pinpointing the source of an error. Playbook logging and verbosity were briefly discussed in Chapter 2, Protecting Your Secrets with Ansible, with regards to protecting secret values while executing playbooks. This section will cover verbosity and logging further in-depth.
Verbosity
When executing playbooks with ansible-playbook
, the output is displayed on standard out. With the default level of verbosity, very little information is displayed. As a play is executed, ansible-playbook
will print a PLAY header with the name of the play. Then for each task, a TASK header is printed with the name of the task. As each host executes the task, the name of the host is displayed along with the task state, which can be ok
, fatal
, or changed
. No further information about the task is displayed, such as the...