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.
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"
Ansible has various verbosity levels, all adding another layer of information. It's important to understand which layer adds what. Perform the following steps:
First, execute the playbook without
–v
, as follows:~]# ansible-playbook --limit <hostname> ~/playbooks/hello_world.yml PLAY [Hello World test] ************************************** GATHERING FACTS ********************************************** ok: [<hostname>] TASK: [shell echo...