AnsiblePilot — Master Ansible Automation

AnsiblePilot is the leading resource for learning Ansible automation, DevOps, and infrastructure as code. Browse over 1,100 tutorials covering Ansible modules, playbooks, roles, collections, and real-world examples. Whether you are a beginner or an experienced engineer, our step-by-step guides help you automate Linux, Windows, cloud, containers, and network infrastructure.

Popular Topics

About Luca Berton

Luca Berton is an Ansible automation expert, author of "Ansible for VMware by Examples" and "Ansible for Kubernetes by Example" published by Apress, and creator of the Ansible Pilot YouTube channel. He shares practical automation knowledge through tutorials, books, and video courses to help IT professionals and DevOps engineers master infrastructure automation.

AAP 2.6 Network Automation: Cisco, Arista, Juniper, and Multi-Vendor Management

By Luca Berton · Published 2024-01-01 · Category: troubleshooting

Automate network infrastructure with AAP 2.6. Configure Cisco IOS/NX-OS, Arista EOS, Juniper Junos, and multi-vendor environments. Network backup, compliance auditing, configuration templating, and change management workflows.

Network Automation with AAP 2.6

AAP 2.6 provides enterprise-grade network automation for multi-vendor environments. Unlike server automation (SSH-based), network automation uses specialized connection plugins and collections designed for network device APIs and CLIs.

Connection Methods

| Connection | Protocol | Use Case | |-----------|----------|----------| | ansible.netcommon.network_cli | SSH CLI | Traditional CLI-based devices | | ansible.netcommon.netconf | NETCONF (SSH) | Juniper, Nokia, structured config | | ansible.netcommon.httpapi | REST API | Arista eAPI, Cisco NX-API | | ansible.netcommon.libssh | SSH (libssh) | High-performance SSH |

Execution Environment for Network

Inventory for Network Devices

Static Network Inventory

Network Credential

Configuration Backup

Multi-Vendor Backup Playbook

Configuration Management

Cisco IOS Configuration

Arista EOS Configuration

Juniper Junos Configuration

Network Compliance Auditing

Compliance Check Playbook

Change Management Workflow

Use AAP workflow templates for network change management:

Rollback Playbook

Resource Modules (Declarative Approach)

Resource modules provide idempotent, declarative network configuration:

States available for resource modules:

| State | Behavior | |-------|----------| | merged | Add/update config (default) | | replaced | Replace specific resource config | | overridden | Replace all resources of this type | | deleted | Remove specific config | | gathered | Read current config (no changes) | | parsed | Parse offline config text | | rendered | Generate device commands without applying |

FAQ

How do I handle devices that don't support collections?

Use ansible.netcommon.cli_command and ansible.netcommon.cli_config for generic CLI-based management. These work with any device that has SSH CLI access.

Can AAP manage network devices through a jump host?

Yes. Use ansible_ssh_common_args: '-o ProxyJump=jumphost.example.com' or configure hop nodes in Automation Mesh to place execution nodes in the same network as the devices.

How do I test network changes safely?

Use Juniper's commit confirmed (auto-rollback timer), Cisco's configure replace with archive, or AAP workflow templates with lab verification before production. Resource modules with state: rendered let you preview commands without applying.

Should I use CLI or API connections?

APIs (NETCONF, eAPI, NX-API) are preferred when available — they provide structured data, transactional commits, and better error handling. CLI is universal but requires parsing unstructured text output.

Can I automate network device firmware upgrades?

Yes. Use ansible.netcommon.net_put or vendor-specific modules to upload firmware, then schedule reboot with verification. Always include rollback procedures and test in lab first.

Conclusion

AAP 2.6 provides a unified platform for multi-vendor network automation. From configuration backup and compliance auditing to automated deployments with change management workflows, AAP transforms network operations from manual CLI sessions into repeatable, auditable, self-service automation.

Related ArticlesAAP 2.6 Architecture and Components: Complete GuideAAP 2.6 Execution Environments: Build, Manage, and Deploy Custom EEsAAP 2.6 Workflow Templates: Advanced Multi-Step Automation GuideAAP 2.6 Automation Mesh: Distributed Execution Across Sites and NetworksAAP 2.6 Self-Service Portal for Network Teams

Category: troubleshooting

Browse all Ansible tutorials · AnsiblePilot Home