Domain 2 of 4 · Chapter 6 of 7

Source of Truth Integration

Unlock the complete study guide + 1,040 practice questions across 16 full exams.

Bundled into the existing Designing, Deploying and Managing Network Automation Systems premium course — no separate purchase.

14-day money-back guarantee — no questions asked.

Included in this chapter:

  • What a source of truth is, and what it is not
  • Intended versus actual: detecting and fixing drift
  • One authoritative system per data domain
  • NetBox: a DCIM/IPAM source of truth
  • NetBox in the pipeline: dynamic inventory and webhooks
  • Nautobot: a source of truth with automation inside
  • Reading Nautobot: one GraphQL query, not N REST calls
  • Golden Config: the intended-versus-actual loop

NetBox and Nautobot as the source of truth

CapabilityNetBoxNautobot
What it isOpen-source DCIM/IPAM source of truthNetBox-derived SoT plus automation platform
Data modelSites, devices, interfaces, prefixes, VLANsSame model (forked from NetBox)
Read APIsREST and GraphQLREST and GraphQL
API authToken in an Authorization: Token headerToken, or direct ORM access from a Job
Ansible inventorynb_inventory dynamic inventoryDynamic inventory (same pattern)
React to changeWebhook on create/update/deleteWebhook, plus native Jobs (Job Hooks)
In-platform automationExternal tools onlyNative Jobs engine (Python via the ORM)
Config complianceAdd external toolingGolden Config: intended-vs-actual diff and remediation

Decision tree

Detect or fixconfig drift?Golden ConfigNautobot compliance loopyesnoRun Python logicinside the platform?Nautobot Jobruns via the ORMyesnoReact the momentintent changes?WebhookPOST to a CI pipelineyesnoNested objectsin one call?GraphQL queryone round-tripyesnoKeep Ansibleinventory in sync?nb_inventorydynamic inventoryyesnoREST APIAuthorization: TokenSoT holds intended state: pair any read with a telemetry check for actual state

Cheat sheet

  • The SoT is the authoritative store of intended state
  • Intended vs actual state drives remediation
  • One authoritative system per data domain
  • SoT data plus templates render device config
  • NetBox is a DCIM/IPAM source of truth
  • Token auth to the NetBox API
  • NetBox dynamic inventory keeps Ansible in sync
  • NetBox webhooks trigger event-driven automation
  • Nautobot extends the NetBox SoT model
  • GraphQL fetches nested SoT data in one query
  • Golden Config operationalizes intended vs actual
  • Nautobot Jobs run automation next to the SoT

Unlock with Premium — includes all practice exams and the complete study guide.

References

  1. Ansible builtin template module (renders a Jinja2 template to a file)
  2. Ansible playbook templating with Jinja2
  3. Terraform state (authoritative record of managed resources)
  4. terraform plan (reads real-world state, shows differences from configuration)
  5. Git — About Version Control
  6. Requests: custom headers (Authorization header dictionary)
  7. RFC 9110 HTTP Semantics — GET method (safe, read-only) Whitepaper
  8. netbox.netbox.nb_inventory — NetBox dynamic inventory source
  9. Ansible dynamic inventory (build inventory at run time)
  10. GitLab CI/CD pipeline trigger tokens (POST to start a pipeline)