Handling OOB Network Changes
In this blog I would like to showcase the power of Ansible Content Collections to build powerful abstractions. Collections are a distribution format for Ansible content that can include playbooks, roles, modules and plugins. For this blog post, let us address an Infrastructure as Code(IaC) use case for network configuration management of BGP. We will walk through examples for both Cisco IOS and Arista EOS devices.
First, let us define a data-model that encapsulates the vendor-agnostic configuration.
bgp_global:
as_number: '65000'
bgp:
log_neighbor_changes: true
router_id:
address: 192.168.1.1
neighbor:
- activate: true
address: 10.200.200.2
remote_as: 65001
bgp_address_family:
address_family:
- afi: ipv4
neighbor:
- activate: true
address: 10.200.200.2
network:
- address: 10.25.25.0
mask: 255.255.255.0
- address: 10.25.26.0
mask: 255.255.255.0
- address: 10.100.100.0
mask: 255.255.255.0
- address: 10.200.200.0
mask: 255.255.255.0
- address: 172.16.0.0
- address: 192.168.1.1
mask: 255.255.255.255
As you might have observed, this data-model matches exactly the input expected by the <vendor>.bgp_global and bgp_address_family modules within the IOS and EOS Continue reading