The Ansible architecture
The Ansible architecture consist of playbooks, plays, and tasks. Take a look at previously df_playbook.yml
:
![](https://static.packt-cdn.com/products/9781784397005/graphics/e1f870ad-3169-4c88-aff2-19364a412160.png)
Ansible Playbook
The whole file is called a playbook, which contains one ore more plays. Each play can consist of one or more tasks. In our simple example, we only have one play, which contains a single task. In this section, we will take a look at the following:
- YAML: This format is extensively used in Ansible to express playbooks and variables.
- Inventory: Inventory is where you can specify and group hosts in your infrastructure. You can also optionally specify host and group variables in the inventory file.
- Variables: Each of the network device is different. It has different hostname, IP, neighbor relations, and such. Variables allow for a standard set of plays while still accommodating these differences.
- Templates: Templates are nothing new in networking. In fact, you are probably using one without thinking it is a template. What do we typically do when we need...