O'Reilly logo

Red Hat Enterprise Linux Server Cookbook by William Leemans

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required