Skip to content

From Configuration Tasks to Declarative Intent with Ansible#

CHNUG #5 digest Program Core pick 12 November 2026

Speakers: Tomas Horyl (Narrowin)

Play the recording: From Configuration Tasks to Declarative Intent with Ansible

  • Why: Most "declarative network automation" talks stop at happy-path Jinja2. This one goes where the real difficulty lives: what happens when defaults, profiles and host exceptions compose; who owns a setting your inventory doesn't mention; and what each platform's validation actually proves. For a PM who cares about configuration management at scale, the validation-matrix table alone justifies the watch.
  • What: A five-stage architecture — declared intent → transformation → native configuration → deployment → device state — implemented in ordinary Ansible inventory, contrasted across three platforms: Cisco IOS (complete-file replacement, the running config decides undeclared settings), Nokia SR Linux (path-scoped update/replace/delete, the target path decides), and Cumulus NVUE (PoC; the declared NVUE root is authoritative, omitted config reverts to defaults). Intent is expressed as update/delete dicts in group_vars/host_vars — inherited group-first, host-last, with explicit deletion (a {} value removes an inherited command). The talk includes an offline renderer test harness (given known inputs, run the renderer with no SSH, compare to expected artifacts), per-platform diff/confirm flows (IOS contextual config diffs; optional rollback timer with auto-cancel), and — unusually honest — a per-platform table of validation blind spots (e.g. IOS: no general argument check, invalid arguments may reach replacement; NVUE: unknown final leaves can pass, types/dependencies unchecked). A closing example shows a correctly-applied configuration expressing the wrong design (trunk allows 10,30 while the endpoint is on VLAN 20): automation can faithfully apply a wrong intention.
  • How: Declared intent lives in inventory; a Python filter transforms it to native CLI (replacing the composition pressure of Ansible templates that become "a program inside inventory"); transformation is deliberately separated from deployment so rendering rules can be tested without touching a switch; deployment machinery is reused across features by changing only the native config data, within each platform's native contract (not a universal API); each stage adds its own checks — fixture tests, device diffs, apply results — and the talk is explicit that none of them proves traffic works, so service verification stays a distinct step. The backup slides show a full CVD-style Cisco campus fabric (OSPF, PIM, BGP l2vpn evpn with VxLAN encap, bridge domains, BDI interfaces) reconciled in ordered group layers via a single role and serial play.
  • Where applicable: General technique, multi-platform by construction (IOS and SR Linux are worked implementations; NVUE is a PoC), tested against containerlab topologies. Context is narrowin's IT/OT critical-infrastructure practice (energy, healthcare, utilities), which explains the emphasis on ownership boundaries and gradual brownfield adoption (baseline-as-source vs running-snapshot-as-source for unowned settings). Implementation effort is not eliminated — the speaker is explicit that "the implementation work has not disappeared" — but the responsibilities are cleanly shared and the machinery is reusable.