There may be some times when you are trying to run an ansible-playbook that you created but getting errors that you are not able to understand. To understand why ansible-playbook is not working, we can enable debugging and logging to understand what is going wrong. Following are the steps to enable logging in ansible. Before running ansible-playbook run the following commands to enable logging: # Specify the location for the log file export ANSIBLE_LOG_PATH=~/ansible.log # Enable Debug export ANSIBLE_DEBUG=True # Run with 4*v for connection level verbosity ansible-playbook -vvvv ... After Ansible has finished running you can inspect the log file which has been created on the ansible-controller: less $ANSIBLE_LOG_PATH 2017-03-30 13:19:52,740 p=28990 u=fred | creating new control socket for host veos01:22 as user admin 2017-03-30 13:19:52,741 p=28990 u=fred | control socket path is /home/fred/.ansible/pc/ca5960d27a 2017-03-30 13:19:52,741 p=28990 u=fred | current working...