Chapter 7. Troubleshooting Ansible

Ansible is simple but powerful. The simplicity of Ansible means that the operation is easy to understand and follow. Being able to understand and follow is critically important when debugging unexpected behavior. In this chapter, we will explore the various methods that can be employed to examine, introspect, modify, and, otherwise debug the operation of Ansible:

  • Playbook logging and verbosity
  • Variable introspection
  • Debugging local code execution
  • Debugging remote code execution

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

Get Mastering Ansible 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.