Augmenting the Ansible network inventory
In Chapter 2, you learned how to create and manage the key elements of an Ansible inventory. In this chapter, you will focus on interacting with Arista cEOS devices to deploy a very simple data center fabric with one spine and two leaves. In the first recipe, you will extend the existing Ansible inventory from Chapter 2 to create two new groups:
spineswill hold your single spine deviceleafswill hold both leaf devices
- First, create the
ch04directory under thechaptersfolder, and reuse thehosts.ymlfile from the inventory that was covered in Chapters 2 and 3, addingceos-03, which is the second leaf in our topology:root@cookbook-lab:~/cookbook-lab/chapters# mkdir ch04 && cp ch03/hosts.yml ch04/hosts.yml && cd ch04/ && vi hosts.yml --- network_equipment: children: arista_ceos: arista_ceos: hosts: ceos...