Executing the first playbook
One of the essential elements of Ansible is its playbooks because, as stipulated in the introduction, they contain the code of the actions or tasks that need to be performed to configure or administer a VM.
Indeed, once the VM has been provisioned, it must be configured, and all of the middleware needed to run the applications that will be hosted on this VM must be installed. Also, it is necessary to perform administrative tasks concerning the configuration of directories and their access.
In this section, we will see what a playbook is made up of, its modules, and how to improve our playbook with roles.
Now, let's start studying how to write a basic playbook.
Writing a basic playbook
The code of a playbook is written in YAML, a declarative language that allows us to easily visualize the configuration steps.
To understand what a playbook looks like, let's look at a simple and classic example; that is, installing an NGINX server...