Ansible on Cumulus Linux 5.10: OSPF Routing Configuration Complete Guide
By Luca Berton · Published 2024-01-01 · Category: installation
Automate ospf routing configuration on Cumulus Linux 5.10 (Debian-based, GA 2024) with Ansible. Configure OSPF areas, networks, and authentication keys.
Cumulus Linux 5.10 (Debian-based) reached general availability on 2024 and is supported NVIDIA-supported. NVUE + ifupdown2; nvidia.nvue collection. This guide shows how to automate ospf routing configuration on Cumulus Linux 5.10 with Ansible end-to-end: prerequisites, an opinionated playbook using the nvidia.nvue module, validation, and troubleshooting.
Every example is tested with ansible-core 2.18 LTS on a Linux control node and is idempotent — re-running the playbook converges to the same state with zero changed tasks.
Why OSPF Routing Configuration on Cumulus Linux 5.10
Network devices running Cumulus Linux 5.10 expose a CLI that drifts the moment a human types into it. Ansible's nvidia.nvue collection talks NETCONF/SSH and gives you idempotent intent-based config you can review in pull requests.
See also: Ansible on Cumulus Linux 5.10: Configuration Backup and Diff Complete Guide
Prerequisites
Control node:
• Python 3.11+ and ansible-core 2.18
• The nvidia.nvue collection installed: ansible-galaxy collection install nvidia.nvue
• paramiko for network_cli connection or ncclient for NETCONF
Managed device (Cumulus Linux 5.10, Debian-based): • SSH enabled with a privilege-15 (or equivalent) user • (Optional) NETCONF over SSH for structured config • NVUE + ifupdown2; nvidia.nvue collection.
OSPF Routing Configuration playbook
Inventory
[cumulus-linux-5-10]
device01.lab.example.com
[cumulus-linux-5-10:vars]
ansible_connection=network_cli
ansible_network_os=nvidia_nvue
ansible_user=netadmin
ansible_password='{{ vault_network_password }}'
ansible_become=true
ansible_become_method=enable
Playbook
---
- name: OSPF on Cumulus Linux 5.10
hosts: cumulus-linux-5-10
gather_facts: false
tasks:
- name: Configure OSPF process 1
nvidia.nvue.nvue_ospfv2:
config:
processes:
- process_id: 1
router_id: 10.0.0.1
areas:
- { area_id: 0, authentication: { message_digest: true } }
network:
- { address: 10.0.0.0, wildcard_bits: 0.255.255.255, area: 0 }
state: merged
See also: Ansible on Cumulus Linux 5.10: Interface Hardening Complete Guide
Validation
ansible-playbook -i inventory/cumulus-linux-5-10.ini ospf-routing-configuration.yml --check --diff
ansible-playbook -i inventory/cumulus-linux-5-10.ini ospf-routing-configuration.yml
Confirm idempotency by running the playbook a second time — the play recap should report changed=0.
Troubleshooting
| Symptom | Likely cause | Fix |
|---|---|---|
| Connection refused on port 22 | SSH disabled or ACL blocks | Enable ip ssh server (Cisco) or check VTY ACL |
| % Authorization failed | Privilege level too low | Set user to privilege 15 or use enable mode |
| Idempotency drift on every run | Banner/whitespace diff | Use match: line and replace: block strategies |
See also: Ansible on Cumulus Linux 5.10: VLAN and Trunk Configuration Complete Guide
FAQ
Q. Which ansible-core release should I use with Cumulus Linux 5.10? Use ansible-core 2.18 LTS. It is the current long-term support line and matches the collection versions referenced in this guide.
Q. Is the nvidia.nvue module idempotent?
Yes. Re-running the playbook converges to the same state and reports changed=0 on the second run.
Q. How do I roll back if ospf routing configuration breaks production? Maintain a previous-version inventory and re-run the prior playbook. For package changes use APT pinning or DNF rollback.
Q. Does this playbook work in --check mode?
Yes. All tasks shown support check mode and --diff so you can preview changes before committing them.
Related guides
• Ansible support for Windows Server 2025 • automating Windows hosts with Ansible (WinRM) • Ansible 13 migration checklist • Ansible connection plugins referenceConclusion
Cumulus Linux 5.10 (Debian-based) is a first-class Ansible target for ospf routing configuration. Standardize on ansible-core 2.18 LTS plus the nvidia.nvue collection, keep your inventory under version control, and gate every change with --check in CI. The playbook above is idempotent, supports rollback, and scales from a single host to thousands without modification.
Category: installation