It may be useful to run an Ansible playbook on a local system. For example for putting a playbook in a crontab or for a new host provisioning. In this note i am showing the several ways to run Ansible playbook locally.
During troubleshooting of Ansible issues it is useful to know how to enable debug mode and increase the level of verbosity. To enable debug and increase verbosity in Ansible you can pass the corresponding environment variables on the command line or define these settings in Ansible configuration file. Warning: The debug output can also include […]
In Ansible playbooks, it is often a good practice to test if a variable exists and what is its value. Particularity this helps to avoid different “VARIABLE IS NOT DEFINED” errors in Ansible playbooks. In this context there are several useful tests that you can apply using Jinja2 filters in Ansible. In this article, i’ll […]
During Ansible playbook debugging it is useful to know how to display host facts or registered variables. To print a message from Ansible playbook, as well as a value of a variable, we can use Ansible debug module. In the examples below i am showing how to print particular Ansible variables and how to list […]