Troubleshooting Ansible

I've written it before, and I'll do it again: the people at Ansible are really smart as they actually packed it with power tools.

One of my favorite troubleshooting tools is --verbose or -v. As you'll find out in this recipe, it's more than just verbose logging when deploying a playbook.

Getting ready

Let's see what happens with a ~/playbooks/hello_world.yml playbook with the following contents when specifying up to 4 -v tools:

- name: Hello World test
  hosts: all
  - action: shell echo "Hello World"

How to do it…

Ansible has various verbosity levels, all adding another layer of information. It's important to understand which layer adds what. Perform the following steps:

  1. First, execute the playbook without –v, as follows: ...

Get Linux: Powerful Server Administration 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.