NetBox / Source of Truth
Why Model Your Network as Data? The Source-of-Truth Problem
What you'll learn
- The real limitation of hand-maintained inventory files at scale
- What 'source of truth' means as a data-modeling problem, not an execution problem
- A preview, real and verified, of what this module builds toward
- That this module is not about re-executing tasks -- it's about where inventory comes from
Listen to a guided explanation of this lesson.
Spoken narration isn't supported in this browser.
Every fleet so far has lived in one file, maintained by hand
A different kind of problem than execution
Nornir (Phase 3.4) answers how do I execute across many devices. NAPALM (Phase 3.5) answers how do I normalize what I get back. Multi-vendor Automation (Phase 3.6) answers how do I select the right driver automatically. None of them ever asked: where does the list of devices itself come from? Every one of them read hosts.yaml, written by a person, by hand.
- hosts.yaml / devices.csvwritten and updated by hand
- Adding a deviceedit the file, redeploy it everywhere it's used
- No relationships, no query languagejust rows
- Structured recordssites, devices, interfaces, IPs -- related, not flat
- Adding a deviceone record, in one place
- Every automation script reads the same live source
A real, verified preview
What this module proves, concretely, by its capstone
This isn't a promise -- it's already been verified in this authoring environment. Adding one device record to a NetBox-shaped backend, with zero local YAML file touched, changes what a real Nornir inventory plugin loads on the very next run.
Before adding a device to NetBox: ['SW1', 'SW2', 'SW3']
After adding SW4 in NetBox (no local file changed): ['SW1', 'SW2', 'SW3', 'SW4']Real, verified output. No hosts.yaml existed anywhere in this test -- the inventory came entirely from NetBox records, and grew the moment a new record was added.
What this module reuses, and what's genuinely new
Not re-taught here
InitNornir(), nr.run(), filtering, and concurrency (Phase 3.4) are assumed known. get_facts()/get_interfaces() and NAPALM's normalized shapes (Phase 3.5) are assumed known. nornir_napalm and automatic driver selection (Phase 3.6) are assumed known. This module adds exactly one new layer underneath all of them: where the inventory itself comes from.
Key takeaways
- Every module since Phase 2.6 has assumed a correct, hand-maintained hosts.yaml already exists -- this module questions that assumption directly.
- Source of truth means one authoritative, structured, queryable place inventory comes from -- a data-modeling problem, not an execution problem.
- A real, verified preview: adding one NetBox device record changed what a real Nornir inventory plugin loaded, with zero local file touched -- this module's capstone builds that in full.
- Nornir, NAPALM, and nornir_napalm mechanics are all prerequisites here, reused not re-taught -- only the inventory source itself is new.