10-01-2023 10:35 PM - edited 10-01-2023 10:36 PM
Hello,
I am wondering about the syntax when adding or removing parameters for example removing a redistribution list under the BGP Process / Address Family IP4 - see example below.
Thanks,
tasks:
- name: no router eigrp
ios_config:
commands:
- no router eigrp 10
- no snmp-server enable traps eigrp
Hello,
I am wondering about the syntax when adding or removing parameters for example removing a redistribution list under the BGP Process / Address Family IP4 - see example below.
Thanks,
tasks:
- name: bgp
ios_config:
commands
- router bgp 65100
address-family ipv4
no redistribute eigrp 15 route-map EIGRP-2-BGP
become: true
register: output
Solved! Go to Solution.
10-16-2023 10:49 PM
Try to define your entire address-familiy configuration using cisco.ios.ios_bgp_address_family and use "replaced" as the state.
10-29-2023 10:16 PM
Hello Marcel,
To me the following solution eventually worked out:
- name: "BGP: no EIGRP redist route map"
ios_config:
lines:
- no redistribute eigrp 10 route-map EIGRP-2-BGP
parents:
- router bgp 65411
- address-family ipv4
become: true
register: output2
10-01-2023 10:43 PM
Hello @Netmart,
Neighbor is missing I think ; examplewith neighbor 192.168.1.1:
- name: bgp configuration
ios_config:
lines:
- router bgp 65100
- neighbor 192.168.1.1 remote-as 65000
- neighbor 192.168.1.1 description Neighbor_to_AS_65000
- address-family ipv4
- no redistribute eigrp 15 route-map EIGRP-2-BGP
become: true
register: output
10-14-2023 08:30 PM
Sorry this does not work:
TASK [BGP: No EIGRP redist route map] ********************************************************************************************************************************************************************************************
fatal: [*******]: FAILED! => {"changed": false, "msg": "dictionary requested, could not parse JSON or key=value"}
10-02-2023 08:51 AM
You can also try using the cisco.ios.ios_bgp_address_family module (https://docs.ansible.com/ansible/latest/collections/cisco/ios/ios_bgp_address_family_module.html#ansible-collections-cisco-ios-ios-bgp-address-family-module
- name: "No EIGRP redist route map"
cisco.ios.ios_bgp_address_family:
config:
as_number: 65100
address_family:
- afi: ipv4
safi: unicast
redistribute:
- eigrp:
as_number: 15
route_map: EIGRP-2-BGP
state: deleted
10-14-2023 07:21 PM - edited 10-14-2023 08:40 PM
Hello Marcel,
If I am trying the following it does delete all neighbor configs und address-family ip4 entries.
The idea was to only delete the route map entry "RM-EIGRP-2-BGP"
tasks:
- name: "BGP: No EIGRP redist route map"
cisco.ios.ios_bgp_address_family:
config:
as_number: 65100
address_family:
- afi: ipv4
redistribute:
- eigrp:
as_number: 10
route_map: RM-EIGRP-2-BGP
state: deleted
become: true
register: output1
Extract of result:
},
"changed": true,
"commands": [
"router bgp 65411",
"no address-family ipv4"
],
"failed": false
10-16-2023 10:49 PM
Try to define your entire address-familiy configuration using cisco.ios.ios_bgp_address_family and use "replaced" as the state.
10-29-2023 10:16 PM
Hello Marcel,
To me the following solution eventually worked out:
- name: "BGP: no EIGRP redist route map"
ios_config:
lines:
- no redistribute eigrp 10 route-map EIGRP-2-BGP
parents:
- router bgp 65411
- address-family ipv4
become: true
register: output2
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide