RWS Architecture article

Cisco NX-OS Ansible Automation Best Practices (Summary)

Summary of Cisco Nexus-as-Code and Ansible documentation used to define DC 3.0 network automation patterns for Cisco NX-OS.

  1. Typesource
  2. Statusactive
  3. Domainnetwork
On this page
  1. Source – Cisco NX-OS Ansible Best Practices
  2. Overview
  3. Context
  4. Decisions
  5. Current State
  6. References
  7. Future Work
  8. Related

Source – Cisco NX-OS Ansible Best Practices

Overview

Summary of Cisco Nexus-as-Code and Ansible documentation used to define DC 3.0 network automation patterns for Cisco NX-OS.

Context

These sources define how NX-OS automation should be structured and executed: role-based playbook design, supported connection methods, module-first implementation, and replace deployment behavior.

Decisions

  • Use role-based playbook structure with inventory groups and group_vars/host_vars separation for deterministic reuse.
  • Standardize on cisco.nxos FQCN modules for idempotent tasks and reserve nxos_config for gaps and full replace.
  • Run AAP workflow stages with explicit precheck, approval, deploy, and postcheck gates.
  • Baseline evidence capture on Ansible + vendor CLI command profiles with parser/version metadata for drift comparisons.
  • Keep full configuration replace anchored to ADR-002 and NX-OS vendor guidance.

Current State

  • Cisco Nexus-as-Code guidance and the Ansible cisco.nxos collection are now the normative references for NX-OS playbook design in DC 3.0.
  • Connection baseline is aligned to current Ansible platform options: ansible.netcommon.network_cli and ansible.netcommon.httpapi; deprecated ansible_connection: local is not used.
  • Deployment pattern aligns to documented module behavior: stage candidate config (for replace file path) and execute replace via cisco.nxos.nxos_config (replace: config, replace_src).
  • Command-profile outputs are captured as raw CLI evidence and parser-normalized artifacts; parser/version pinning is required for drift reliability.

References

Future Work

  • Re-validate this source note when major versions of the cisco.nxos collection or AAP are adopted.
  • Add module compatibility notes per supported NX-OS train used in production.