Ansible stores the information for the nodes that it manages using Ansible variables. Ansible variables can be declared in multiple locations. However, in observing the best practices for Ansible, we will outline the two main parts where Ansible looks for variables for the nodes that are declared in the inventory file.
Using Ansible's variables
Getting ready
In order to follow along with this recipe, an Ansible inventory file must be already defined as outlined in the previous recipes.
How to do it...
In the inventory file, we define hosts and we group the hosts into...