June 2020
Intermediate to advanced
410 pages
9h 52m
English
One of the most complex things in the IT field is not creating software and systems, but debugging them when they have problems. Ansible is not an exception. No matter how good you are at creating Ansible playbooks, sooner or later, you'll find yourself debugging a playbook that is not behaving as you thought it would.
The simplest way of performing basic tests is to print out the values of variables during execution. Let's learn how to do this with Ansible, as follows:
---- hosts: localhost tasks: - shell: /usr/bin/uptime register: result - debug: var: result
$ ansible-playbook debug.yaml
You will ...