Terraform is a very good Infrastructure-as-Code (IaC) tool that allows us to build complex infrastructure with code.
As we studied in Chapter 6, Provisioning Azure Infrastructure with Terraform, concerning the construction of virtual machines, on all cloud providers, the common objective of Terraform is to build a VM without configuring it, which includes the installation of its middleware and its administration.
Among the Configuration-as-Code (CaC) tools that allow us to use Terraform to configure a VM after its creation, there is Ansible (https://www.ansible.com/), which is very popular in the open source world (much like Chef and Puppet).
One of the advantages of Ansible is that it's agentless, which means you don't need to install an agent on the VMs you want to configure. Thus, to know which VMs to configure, Ansible uses a file called inventory, which contains the list of VMs that need configuring.
In this recipe, we will learn...