Pcornel
Automation

Network Automation

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

Back to the Topic

Answer

Network automation is changing and checking network devices with code instead of by hand: an inventory says which devices exist, a transport reaches them (SSH, NETCONF, RESTCONF, an API), and each change is shown as a diff, applied and then verified.

Remember

Most failures are inventory and access: wrong address, wrong platform type, missing credentials or a transport that is not enabled. Always run a dry run with a diff before applying. Verify the result on the device, not in the tool's return code.

First checks

  • ansible-inventory -i netbox.yml --graph — device inventory from SoT
  • ansible network -m cisco.ios.ios_facts — gather facts
  • Config backup job status — safety net

Verify in this order

SoT → render → validate → deploy (diff) → verify state

Where it usually breaks

A completed automation run proves only the recorded automation path and device responses; it does not independently prove convergence, persistence, end-to-end forwarding, policy correctness or future network health.

Automation/controller success is not target-state proof; target config/state is not effective-runtime proof; effective state is not workload proof.

Network Automation 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=5586

Confirmation

Confirm action

Continue?