How it works...
In this recipe, we began by populating the sites in our sample network and defining the sites data structure, which describes the physical locations of our data centers in the all.yml file under group_vars. We created an Ansible role in order to populate the NetBox database and the first task we performed within this role was to use the netbox_site module to create all the sites within our network. We looped across all the sites defined in the sites data structure and pushed the data to NetBox using the netbox_site module.
We created a new playbook, which will be our master playbook, to populate the contents of our network inventory into NetBox and we referenced the role that we created in order to start executing all the ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access