I'm using the community edition of Netbox to document all my IPAM (IP-Address-Management), DNS and general infrastructure. The long-term goal is to deploy as much of the configuration from Netbox to reality through different means.
The first Configuration via Netbox should be my Bind9 DNS-Server, where I deploy it via Ansible. For that Ansible uses the Netbox-Plugin to fill the dynamic inventory. Many guides simply paste the sample inventory without any explanation and show how to run it.
plugin: netbox.netbox.nb_inventory validate_certs: true group_by: - device_roles - sites
I created a readonly API-Key.
The Netbox-Url and Key are set via the Environment variables NETBOX_TOKEN and NETBOX_API for the URL, like https://netbox.homelab.internal
.
The inventory can me checked with ansible-inventory --list -i netbox_inv.yaml
and uses the environment variables for accessing the instance.
Any more informations have to be registered as variables through api-calls via ansible.