Skip to content

HOWTO: Export NetBox Inventory for Ansible and Nornir

Inventory export is the bridge between NetBox as source of truth and Ansible/Nornir as execution engines. This HOWTO walks through running the HybridOps inventory exporter, reading and validating the output YAML for both Ansible and Nornir, confirming that groups, tags, and host variables are exported correctly, and wiring the freshness check that fails CI/CD jobs when the exported inventory is stale. This is the operational companion to the conceptual HOWTO on NetBox inventory flow.

What this covers:

  • Running make inventory.netbox-export and validating the output schema for Ansible and Nornir
  • Group, tag, and host variable export verification: confirming env, role, and site metadata is present
  • CI/CD freshness check configuration: failing fast when exported inventory is more than N hours old

Learn this in Academy: IPAM-Driven Infrastructure track