[Ansible] – How to debug and troubleshooting?

Log Files

The path for the logs is configured by the param log_path ansible.cfg in the file. Also, it could be done by the environment variable $ANSIBLE_LOG_PATH. Following an example. See more about it in the Ansible docs.

log_path = /home/tmp/logs/ansible.log

Debug Verbose Levels

The command is executed with the following parameters in order to output the data.

Param Desc
-v Display output data
-vv Display output and input data
-vvv Shows info about connections to hosts.
-vvvv Adds extra verbosity options

Also, check more here about the attribute –debug which can be used in the playbooks to output data information.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s