Ansible verbosity

One of the first options anyone picks up is the debug option. To understand what is happening when you run the playbook, you can run it with the verbose (-v) option. Every extra v will provide the end user with more debug output.

Let's see an example of using the playbook debug for a single task using the following debug options:

  • The -v option provides the default output, as shown in the preceding examples.
  • The -vv option adds a little more information, as shown in the following example:
 Using /etc/ansible/ansible.cfg as config file PLAYBOOK: setup_apache.yaml ******************************* 1 plays in setup_apache.yaml PLAY [all] ************************************************ TASK [setup] ********************************************** ...

Get Learning Ansible 2 - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.