[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.

[defaults]
log_path = /home/tmp/logs/ansible.log

Debug Verbose Levels

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

Parameters
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.

 

Advertisements

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 )

Google+ photo

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

Twitter picture

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

Facebook photo

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

Connecting to %s