Adding data to Nautobot with Ansible
Based on a fresh install, Nautobot still doesn’t have data in it, so it is pretty much useless for us. This section is going to show how Ansible can be used to add devices (and much more data) to Nautobot.
Ensure you are in the chapter-10
directory in the book’s repo.
Execute the 01-add-locations.yml
playbook:
Figure 10.6 – Adding data to Nautobot with an Ansible playbook
This playbook uses two Ansible modules in the Nautobot Ansible collection: networktocode.nautobot.location_type
and networktocode.nautobot.location
.
In our network, we are creating two location types – Region
and Colo
– and creating three locations: East Coast
(which is of type Region
) and then Jersey City
and New York City
(which are of type Colo
).
Note
Given this book assumes prior knowledge of Ansible, we are not going to cover the details of each module. You can use ansible-doc
or view the Ansible...