← Back to portfolio Reference Architecture
Network Engineering · Governed Automation

Network Automation, Security & AI

A reference architecture for teams with deep legacy networking experience moving into automation and AI-assisted operations — built on Ansible, Rundeck, Git, and a source of truth, and designed from the start to produce audit evidence for HIPAA, SOC 2, and HITRUST.

Scope: Network layer Cisco · NX-OS · Firewalls ADC · VIPs · App Gateway Azure & AWS networking Governance: HIPAA · SOC 2 · HITRUST Well-Architected

How to read this. Part A is the individual learning path — the ramp from CLI-driven networking into automation. Part B is the platform itself. Part C is the governance layer: Well-Architected alignment and the HIPAA · SOC 2 · HITRUST control mapping that security leadership and auditors ask for. Part D is runnable code. Parts C and D aren't day-one reading.

PART A

The Personal Journey

Everything downstream assumes the first few rungs of this ladder.

The mindset shift

Legacy networking rewards knowing the box — the CLI, the quirks, the war stories. Automation rewards describing the intent and letting a tool apply it identically every time. Twenty years of CLI knowledge isn't discarded; it's exactly what makes the automation correct. The tool is fast and consistent. The engineer is the one who knows what "correct" means.

Old habitNew habit
Log into the box and type commandsDescribe the desired state in a file; the tool applies it
"It works, I remember what I did"It's in Git — anyone can see what changed, when, and why
Fix it live at 2 a.m.Test the change offline first, then apply with a rollback ready
Knowledge lives in one person's headKnowledge lives in code plus a source of truth everyone reads

The skills ladder — what to learn, in order

One rung at a time. Each is useful on its own, so the investment pays off even if progress pauses. Don't skip rung 1 — Git and a comfortable shell remove most of the friction later.

0
Networking expertise — already in hand. This is the hard part.
1
Linux + Git — the shell, SSH, and version control: the ground floor
2
Python basics — read a script, tweak it, write a small one (Netmiko)
3
YAML + Jinja2 — the data format and templating automation is written in
4
Ansible — run the same change across 100 devices, safely
5
Source of truth (NetBox) — the approved intended state of the network
6
Cloud networking — Azure VNet/NSG/App Gateway, AWS VPC/SG/ALB
7
CI/CD & review — pull requests plus automated checks
8
AI-assisted ops — ChatOps, config generation, log triage, doc Q&A

A realistic 90-day plan

Two focused hours a few times a week is enough. By day 90 you'll have done, on lab gear, the exact first three things any platform needs: backup, inventory, and one compliance check.

WeeksFocusGoal you can show someone
1–2Git + Linux shellPush a repo; branch; open a pull request
3–4Python fundamentalsScript that SSHes to a device and prints show version
5–6YAML + Jinja2Generate a switch config from a template plus a data file
7–9Ansible, read-onlyBack up configs from 3+ lab devices; inventory report
10–11Ansible + a checkOne compliance check ("is Telnet disabled everywhere?")
12Wire it togetherTrigger the backup from a Rundeck job with a form and logging

Free places to practice — no lab gear required

None of this requires production access, or even owning hardware.

Cisco DevNet Sandbox
Free always-on and reservable IOS-XE / NX-OS / ACI with real APIs. The best place to start.
developer.cisco.com/site/sandbox
Containerlab
Multi-vendor topologies as containers on a laptop — declarative YAML, fast, free.
containerlab.dev
Azure free account
Real VNets, NSGs, and App Gateway to automate against.
azure.microsoft.com/free
AWS Free Tier
Real VPCs, security groups, and Route 53 to automate against.
aws.amazon.com/free
Batfish sample net
Analyze real configs offline — no devices needed at all.
batfish.readthedocs.io
DevNet Ansible labs
Guided "Ansible with Cisco" tutorials, step by step.
developer.cisco.com/automation-ansible

The core toolset — and why each exists

Git + GitHub
Version control and peer review. The system of record for all automation code.
learngitbranching.js.org
Python
The language of network automation — you read far more than you write at first.
Kirk Byers' free course
Netmiko
Python library that SSHes to network gear — the first "hello world."
github.com/ktbyers/netmiko
Ansible
Runs the same change across many devices via vendor modules, safely.
Network getting-started
Jinja2
Templating — turn a data file into a device config, consistently.
jinja.palletsprojects.com
NetBox
Source of truth: approved intended state — devices, IPs, VLANs, VIPs.
netboxlabs.com/docs
Rundeck
The ops front door: forms, approvals, scheduling, logging, self-service.
Rundeck + Ansible
Batfish
Tests a proposed change before deploy — "will this break connectivity?"
pybatfish.readthedocs.io

Cloud learning paths (free): Azure network foundations · AWS VPC docs. Community: NetworkToCode Slack, r/networking, and the Packet Pushers automation podcasts.

Where AI actually fits — and where it must not

AI is a genuine accelerator for an engineer moving into automation, but it belongs in the authoring and diagnosis seat, not the apply seat. Use it to move faster; keep the guardrails — review, approvals, testing — exactly as strict.

Good uses — start here

  • Explain-this: paste a playbook, config, or error — "what does this do, why did it fail?" A patient tutor that never tires.
  • Draft-then-review: "Write a Jinja2 template for an access port with a voice VLAN." Every line gets reviewed before it touches anything.
  • Translate: "Convert these CLI commands into an Ansible task." Ideal for migrating knowledge you already have.
  • Log and alert triage: summarize noisy syslog, cluster similar events, draft a first-pass root cause.
  • Docs Q&A and ChatOps (later): ask vendor docs precise questions; a chat command triggers a read-only diagnostic job.
Hard rules — regulated environments

AI drafts; a human reviews; version control, approvals, and testing gate the apply. No AI-to-production without a person in the loop.

Never paste secrets, private keys, credentials, regulated data, or full production configs with real addressing into a public AI tool. Use sanitized examples or an approved private model covered by the appropriate agreements.

Verify specifics against vendor docs and live state. Models confidently invent numbers, limits, and defaults — treat the output like a strong junior engineer's first draft.

PART B

The Platform

The A–Z blueprint. Part A is how an individual gets ready to build this; Part B is what "this" is.

The golden path — every production change follows it

Operating model
Network Engineer Pull Request Peer Review + Automated Validation Rundeck Approval / Scheduled Job Ansible Automation Cisco · NX-OS · Firewalls · ADC / VIPs Azure · AWS · DNS / IPAM · Certificates Post-change Validation Monitoring · ITSM · Audit Logging

Automate safely — earn trust before touching production:

DiscoverBack upValidateReport → Remediate (with approval) → Controlled production changes

Don't start by auto-changing production firewall policy, routing, or core switches. Prefer, in order: Vendor API → Ansible resource module → NETCONF/RESTCONF → Vendor CLI module → raw CLI (last resort).

Platform architecture

Control plane & targets
Engineers · Operations · Service Desk Rundeck Self-Service RBAC · Approvals · Scheduling · Forms Ansible Control Layer Playbooks · Roles · Collections · Tests On-Prem Network Cisco · NX-OS Firewalls · ADC DNS / IPAM Load Balancers Azure Networking VNet · Subnets · NSG Application Gateway Route Tables · UDR Private DNS AWS Networking VPC · Subnets · SG Transit Gateway ALB / NLB Route 53 Validation & Audit Monitoring · SIEM · ITSM SUPPORTING SERVICES Source of Truth (NetBox) · Secrets Vault · Enterprise PKI Pre-change Validation (Batfish) · Git & Peer Review

Component responsibilities

ComponentDoesIs not
AnsibleBackup, facts, config compare, standards validation, device/VLAN/port/routing changes, firewall and ADC objects, cloud networking, evidence, rollbackThe monitoring platform · the permanent source of truth · a change-management replacement · a place for clear-text credentials
RundeckScheduling, self-service forms, RBAC, approvals, ITSM ticket integration, notifications, output capture, rollback, audit historyWhere code is authored or reviewed — that belongs in version control
GitAll automation code, templates, and standards; peer review, branch protection, CI (lint / syntax / secret-scan), code ownership rulesA store for private keys or credentials — ever
NetBoxApproved intended state: devices, sites, interfaces, VLANs/VRFs, IPs, VIP ownership, load-balancer relationshipsA blind mirror of live config — discovery reports drift, never silently overwrites
Secrets vaultShort-lived, scoped, least-privilege credentials; the secret is never displayed to the user or written to logsAnything living in a repository or a clear-text inventory

Firewall and ADC workflows

Firewall changes run: app owner → network/security review → source, destination, port and protocol verified → change ticket → automation builds proposed policy → pre-change validation → commit → connectivity test → evidence attached to the ticket.

Safety controls: no any-any without security approval, temporary rules carry mandatory expiration dates, backup before major changes, post-change traffic validation required.

VIP creation on an application delivery controller runs: request → validate IP in the source of truth → validate DNS → validate certificate → services and service group → health monitor → VIP → bind SSL certificate → persistence and policies → validate backend and frontend → update source of truth and ITSM.

Maturity model

A phased path from zero to governed automation. Durations are indicative for a mid-size estate; the sequence matters far more than the calendar.

PhaseDurationOutcome
1 · Discovery2–4 wksCurrent-state architecture, inventory, automation backlog, security model, repo and environment design
2 · Foundation3–6 wksAnsible + Rundeck + repo, branch protection, SSO, secrets integration, SIEM forwarding, lab
3 · Read-only3–5 wksInventory reports, nightly backups, drift reports, certificate-expiration report
4 · Compliance4–6 wksDevice baseline, firewall-rule review, ADC standards, cloud policy checks, compliance dashboard
5 · Low-risk changes4–8 wksVLAN and switch-port, NTP/DNS/syslog, firewall objects, ADC member enable/disable — with forms and approvals
6 · AdvancedongoingFirewall policy, VIP provisioning, App Gateway, certificate replacement, routing changes, upgrades, event-driven ops
First ten use cases · in order

1 config backup · 2 device inventory · 3 certificate-expiration report · 4 baseline compliance · 5 VIP and backend inventory · 6 firewall object/rule inventory · 7 Azure and AWS network inventory · 8 standard switch-port config · 9 ADC member enable/disable · 10 approved firewall address-object creation.

Security, roles & environments

Roles: Automation Admin (platform; cannot bypass production review) · Developer (builds and tests, opens PRs; no direct production execution) · Network Engineer (runs approved jobs in an assigned area) · Approver · Service Desk (limited self-service) · Auditor (read-only logs, changes, reports).

Access: SSO · MFA · RBAC · least privilege · dedicated service accounts · quarterly access reviews · centralized audit logging · no shared accounts · no clear-text credentials · production separated from development.

Environments: Development → Lab → Test → Pre-Production → Production, each with separate inventories, credentials, orchestration projects, protected branches, and cloud identities. Production never uses development credentials. Every production change is traceable: requestor, approver, ticket, timestamp, target, previous and proposed config, commands run, validation results, final and rollback status.

Event-driven ops — start diagnostics-only

Monitoring alert → diagnostic job → automation checks state → results to chat and ITSM → engineer approves remediation. Automatic remediation stays limited to well-tested, low-risk actions. Add pre-change reachability analysis once the foundation and read-only automations are trusted.

Certificates — a first-class network responsibility

Certificates attach to ADC VIPs, Azure Application Gateway, AWS ALB/NLB, firewalls, VPN gateways, wireless controllers, and management interfaces. Track name, CN, SANs, issuer, serial, expiration, owner, location, listener binding, renewal process, and private-key location. Private keys are never committed to a repository.

90dnotice
60drenewal starts
30dhigh alert
14dcritical
7descalation

Azure App Gateway pattern: Enterprise PKI/CA → Key Vault → Managed Identity → App Gateway → HTTPS listener. Monitoring stays with the monitoring platform — automation does not replace it.

PART C

Governance, Well-Architected & Compliance

What makes this enterprise-grade rather than a pile of scripts — the Well-Architected alignment and the control mapping leadership, security, and auditors will ask for.

Enterprise design tenets

Every decision in Part B traces back to five non-negotiable tenets. In a regulated environment where sensitive data may traverse or depend on the network, these separate automation from governed automation.

TenetWhat it means here
Zero standing trustNo human logs into production gear directly. Access is brokered through the orchestration layer with SSO and MFA, scoped to a role and network area; every action attributable to one identity.
Everything as codeIntent, standards, and workflows live in version control. No undocumented change — the pull request is the change record.
Least privilegeDedicated automation service accounts, short-lived and scoped credentials, no shared logins, quarterly access recertification.
Defense in depthIdentity, segmentation, secrets isolation, pre-change validation, and monitoring each stand alone — no single control is load-bearing.
Immutable auditCommit history, job logs, and SIEM records form a tamper-evident record of who changed what, when, why, with what approval, and the result.

Well-Architected Framework alignment

Because the footprint spans on-premises, Azure, and AWS, the platform is evaluated against AWS Well-Architected (6 pillars) and Azure Well-Architected (5 pillars) in parallel.

PillarHow the platform delivers it
Operational ExcellenceRunbooks are code, reviewed via pull request, executed with logging and rollback. Standardized jobs, self-service forms, and post-change validation reduce toil and human error.
SecuritySSO/MFA, RBAC, least privilege, vaulted secrets, automated segmentation, pre-change validation, centralized audit to SIEM.
ReliabilityNightly backups, drift detection, HA validation, reachability analysis, DR-path validation. Every change has a tested rollback.
Performance EfficiencyAPI and module-first over raw CLI; idempotent playbooks; validated changes applied consistently at scale.
Cost OptimizationOpen-source core on existing infrastructure; automation cuts manual hours and failed-change rework; inventory surfaces decommissionable assets.
Sustainability (AWS)Right-sizing and decommissioning driven by inventory; container-based labs instead of always-on hardware for dev and test.
Deviation note

AWS Well-Architected adds a sixth Sustainability pillar that Azure Well-Architected does not name separately. Where a design targets a specific cloud, use that cloud's pillar set; the security and reliability tenets are equivalent across both.

Security architecture — defense in depth

Layer 1  Identity        SSO + MFA · RBAC · dedicated service accounts · no shared logins
Layer 2  Authorization   Least privilege · per-area scoping · approval gates for sensitive jobs
Layer 3  Secrets         Managed vault · short-lived, scoped · never in a repo or a log
Layer 4  Change control  Pull request + peer review + code owners + CI (lint/syntax/secret-scan)
Layer 5  Validation      Pre-change reachability + post-change verification + drift detection
Layer 6  Segmentation    Automated, reviewed firewall/NSG/SG policy · no any-any without approval
Layer 7  Detection       SIEM ingest of all job + config-change events · unauthorized-change alerts
Layer 8  Recovery        Nightly backups · tested rollback · HA + DR-path validation

No single layer is trusted to be sufficient. A failure or bypass at one layer is contained by the others — the core requirement behind both the HIPAA risk-management standard and HITRUST's control depth.

Compliance control mapping

The table auditors and security leadership ask for. Each platform capability maps to the HIPAA Security Rule (45 CFR Part 164, Subpart C), the SOC 2 Trust Services Criteria (AICPA TSP §100), and the relevant HITRUST CSF domain.

Platform capabilityHIPAA Security RuleSOC 2 (TSC)HITRUST CSF
SSO + MFA, unique identity per user and service account§164.312(a)(1); (d); §164.308(a)(4)CC6.1–6.301 · Access Control
RBAC, least privilege, quarterly recertification§164.308(a)(3); (a)(4)CC6.1, CC6.301 · Access Control
Immutable audit logging (commit history + job logs + SIEM)§164.312(b); §164.308(a)(1)(ii)(D)CC7.2, CC7.311 · Audit Logging & Monitoring
Change control: pull request, review, approvals, ITSM§164.308(a)(1); §164.312(c)CC8.110 · Config & Change Mgmt
Vaulted secrets; encryption of credentials and keys§164.312(a)(2)(iv); (e)(2)(ii)CC6.1; C1.106 · Configuration Mgmt
Automated, reviewed segmentation (FW / NSG / SG)§164.312(e)(1); §164.308(a)(1)CC6.6, CC6.709 · Transmission Protection
Config backup, versioning, drift detection§164.312(c)(1); §164.308(a)(7)A1.2, A1.3; PI112 · Continuity & DR
Pre-change and post-change validation§164.312(c)(2); §164.308(a)(8)CC8.1; PI1.110 · Config & Change Mgmt
Certificate lifecycle management and monitoring§164.312(e)(2)(ii)CC6.1, CC6.709 · Transmission Protection
Backup + tested rollback + DR-path validation§164.308(a)(7)A1.2, A1.312 · Continuity & DR
Required vs. addressable

The HIPAA Security Rule marks some specifications required and others addressable — implement, adopt an equivalent, or document why not. This architecture is designed to implement the addressable specifications (encryption, session controls, integrity mechanisms) rather than document exceptions. That's the direction Security Rule modernization is moving, and what a HITRUST r2 assessment expects.

Continuous compliance — the platform produces its own evidence

The strongest audit posture is one where evidence is a byproduct of normal operation, not a scramble before an assessment.

# Every production change automatically yields:
  requestor + approver + change ticket      access-control & change-mgmt evidence
  timestamped commit + peer review          integrity & separation-of-duties evidence
  job log + automation output               audit-control evidence (who / what / when)
  pre- and post-change validation results   processing-integrity evidence
  SIEM record of all of the above           monitoring & non-repudiation evidence
Retention

HIPAA requires documentation be retained six years (45 CFR §164.316(b)(2)(i)). Configure repository, orchestration, and SIEM retention accordingly, and treat audit logs as records — not operational scratch.

Regulated-data handling rules inside automation

  • No regulated data in configs, repositories, logs, backups, or AI prompts. Sanitize device backups before storage.
  • No secrets, private keys, or credentials in a repository or clear-text inventory — vault only; scrubbed from job output.
  • Encrypt in transit and at rest: SSH/HTTPS/API/NETCONF for access; encrypted backup storage; TLS between platform components.
  • Segregate environments: production never uses development credentials or identities.
  • Execute the appropriate agreements with any third party that could process regulated data before it enters a production workflow.
Shared responsibility & assessment note

This mapping shows how a platform supports and evidences controls — it does not by itself make an organization compliant. SOC 2 requires an independent CPA attestation; HITRUST requires a validated e1 / i1 / r2 assessment through an authorized assessor. Cloud controls follow the shared responsibility model. Any real implementation should be reviewed by security and compliance against the organization's current risk analysis (§164.308(a)(1)(ii)(A)) and active audit scope.

PART D

Live Code You Can Run

Small and real. Point these at a free sandbox or a Containerlab topology — never production — until you trust them.

D.1 · First script — Netmiko "hello world"

# show_version.py — SSH to a device and print facts.  pip install netmiko
from netmiko import ConnectHandler

device = {
    "device_type": "cisco_ios",
    "host": "sandbox-iosxe-latest-1.cisco.com",  # public DevNet sandbox
    "username": "admin",
    "password": "C1sco12345",                       # published sandbox credential
}
with ConnectHandler(**device) as conn:
    print(conn.send_command("show version"))
    print(conn.send_command("show ip interface brief"))

Run python show_version.py — that's a device automated.

D.2 · Ansible nightly config backup (use case #1)

# playbooks/backup/backup_ios.yml
- name: Back up Cisco IOS running-config
  hosts: ios
  gather_facts: false
  tasks:
    - name: Pull running-config
      cisco.ios.ios_command:
        commands: show running-config
      register: run
    - name: Save to a dated file
      ansible.builtin.copy:
        content: "{{ run.stdout[0] }}"
        dest: "backups/{{ inventory_hostname }}-{{ ansible_date_time.date }}.cfg"
      delegate_to: localhost

ansible-playbook -i inventories/lab/hosts.yml playbooks/backup/backup_ios.yml

Schedule that same command as a nightly Rundeck job and use case #1 is done. Credentials come from a vault or the orchestrator's key storage — never clear-text in the inventory.

D.3 · A read-only compliance check (use case #4)

# Compliance — Telnet must be disabled
- name: Read VTY transport config
  cisco.ios.ios_command:
    commands: show running-config | section vty
  register: vty
- name: Fail if Telnet is permitted
  ansible.builtin.assert:
    that: "'transport input telnet' not in vty.stdout[0]"
    fail_msg: "{{ inventory_hostname }}: Telnet ENABLED — non-compliant"

This reports a problem; it changes nothing. That's exactly how trust gets built before automating fixes.

D.4 · Config from a template — Jinja2

# templates/ios/access_port.j2
interface {{ interface }}
 description {{ description }}
 switchport mode access
 switchport access vlan {{ access_vlan }}
{% if voice_vlan is defined %} switchport voice vlan {{ voice_vlan }}
{% endif %} spanning-tree portfast

Feed it a data file and the same correct port config renders every time — no more copy-paste drift.

D.5 · CI that guards every change

# .github/workflows/lint.yml
on: [pull_request]
jobs:
  ansible-lint:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - run: pip install ansible ansible-lint yamllint
      - run: yamllint .
      - run: ansible-lint playbooks/
      - uses: gitleaks/gitleaks-action@v2   # secret scan

Every pull request is now auto-checked for style, syntax, and leaked secrets before a human reviews it. That's the whole idea in one file.

D.6 · The scheduled job that ties it together

# Rundeck job definition
- name: Back Up All Network Configurations
  group: Network/Backup
  schedule:
    time: { hour: "2", minute: "0" }   # nightly 02:00
  options:
    - name: environment
      values: [lab, test, production]
      required: true
  sequence:
    commands:
      - script: |
          ansible-playbook \
            -i inventories/${option.environment}/hosts.yml \
            playbooks/backup/backup_ios.yml
  notification:
    onfailure:
      plugin: { type: itsm-incident }   # auto-open a ticket on failure

A scheduled, logged, role-controlled front door to the exact playbook from D.2 — with an automatic incident if the backup fails.