Pcornel
Automation · Network Automation

Device Inventory

Cheat sheet · https://pcornel.dk/topic.php?topic=5588

Back to the Topic

Answer

Device Inventory is the authoritative automation view of network targets, identities, addresses, platform metadata, groups and variables used to select and parameterize work.

Remember

  • Inventory record exists ≠ device reachable.
  • Hostname label ≠ unique device identity unless anchored to a stable identifier.
  • Group membership ≠ intended change scope when inheritance or dynamic rules are involved.
  • Inventory metadata ≠ live device capability; software, interfaces or roles may have drifted.

First checks

  • ansible-inventory -i netbox.yml --list | jq '._meta.hostvars | length' — device count
  • Platform/network_os per device — connection settings
  • Management IP and credentials source — reachability

Verify in this order

SoT devices → inventory → automation targets

Where it usually breaks

Inventory proves what the automation system intends to target, not that every record is current, reachable, authorized or semantically correct.

Inventory/vars → play/task selection → connection/become → module request → module result → target object read-back → handler/service effective state → workload verification.

Device Inventory Network Automation proof-boundary map

BoundaryHealthy evidenceSuspicious evidence
Intent / scopeSource revision and exact targets are explicitStale inventory, hidden selector or wrong variables change scope
Management operationTransport/model/payload and per-device response are traceableAuth/capability/parser differences hide partial or wrong execution
Device stateEffective and persistent state are read backAccepted config/API result is mistaken for convergence
Network proofOriginal control/data-plane or service test passesAutomation summary substitutes for actual network acceptance

Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=5588

Confirmation

Confirm action

Continue?