Resource module to configure route maps.
Version added: 2.1.0
- This module configures and manages the attributes of Route maps on Cisco IOS.
Note
- Tested against Cisco IOSXE Version 17.3 on CML.
- This module works with connection
network_cli
. See https://docs.ansible.com/ansible/latest/network/user_guide/platform_ios.html
# Using deleted
# Before state:
# -------------
#
# router-ios#sh running-config | section ^route-map
# route-map test_1 deny 10
# description this is test route
# match ip next-hop prefix-list test_2_new test_1_new
# match ip route-source 10
# match security-group source tag 10 20
# match local-preference 100 50
# match mpls-label
# route-map test_1 deny 20
# match track 105
# match tag list test_match_tag
# match route-type level-1
# match additional-paths advertise-set all group-best
# match as-path 200 100
# match ipv6 address test_acl_20
# continue 100
# route-map test_2 deny 10
# match security-group source tag 10 20
# match local-preference 55 105
# match mpls-label
# match ipv6 address test_ip_acl
# match ipv6 next-hop prefix-list test_new
# match ipv6 route-source route_src_acl
# set automatic-tag
# set ip precedence critical
# set ip address prefix-list 192.0.2.1
# set aigp-metric 100
# set extcommunity cost pre-bestpath 10 100
# set ip df 1
# set ip next-hop verify-availability 198.51.111.1 100 track 10
# set ip next-hop recursive global 198.51.110.1
- name: Delete provided Route maps config
cisco.ios.ios_route_maps:
config:
- route_map: test_1
state: deleted
# Commands Fired:
# ---------------
#
# "commands": [
# "no route-map test_1"
# ]
# After state:
# -------------
# router-ios#sh running-config | section ^route-map
# route-map test_2 deny 10
# match security-group source tag 10 20
# match local-preference 55 105
# match mpls-label
# match ipv6 address test_ip_acl
# match ipv6 next-hop prefix-list test_new
# match ipv6 route-source route_src_acl
# set automatic-tag
# set ip precedence critical
# set ip address prefix-list 192.0.2.1
# set aigp-metric 100
# set extcommunity cost pre-bestpath 10 100
# set ip df 1
# set ip next-hop verify-availability 198.51.111.1 100 track 10
# set ip next-hop recursive global 198.51.110.1
# Using deleted without any config passed (NOTE: This will delete all Route maps configuration from device)
# Before state:
# -------------
#
# router-ios#sh running-config | section ^route-map
# route-map test_1 deny 10
# description this is test route
# match ip next-hop prefix-list test_2_new test_1_new
# match ip route-source 10
# match security-group source tag 10 20
# match local-preference 100 50
# match mpls-label
# route-map test_1 deny 20
# match track 105
# match tag list test_match_tag
# match route-type level-1
# match additional-paths advertise-set all group-best
# match as-path 200 100
# match ipv6 address test_acl_20
# continue 100
# route-map test_2 deny 10
# match security-group source tag 10 20
# match local-preference 55 105
# match mpls-label
# match ipv6 address test_ip_acl
# match ipv6 next-hop prefix-list test_new
# match ipv6 route-source route_src_acl
# set automatic-tag
# set ip precedence critical
# set ip address prefix-list 192.0.2.1
# set aigp-metric 100
# set extcommunity cost pre-bestpath 10 100
# set ip df 1
# set ip next-hop verify-availability 198.51.111.1 100 track 10
# set ip next-hop recursive global 198.51.110.1
- name: Delete all Route maps config
cisco.ios.ios_route_maps:
state: deleted
# Commands Fired:
# ---------------
#
# "commands": [
# "no route-map test_1",
# "no route-map test_2"
# ]
# After state:
# -------------
# router-ios#sh running-config | section ^route-map
# router-ios#
# Using merged
# Before state:
# -------------
#
# router-ios#sh running-config | section ^route-map
# router-ios#
- name: Merge provided Route maps configuration
cisco.ios.ios_route_maps:
config:
- route_map: test_1
entries:
- sequence: 10
action: deny
description: this is test route
match:
ip:
next_hop:
prefix_lists:
- test_1_new
- test_2_new
route_source:
acls:
- 10
security_group:
source:
- 10
- 20
local_preference:
value:
- 50
- 100
mpls_label: true
- sequence: 20
action: deny
continue_entry:
entry_sequence: 100
match:
additional_paths:
all: true
group_best: true
as_path:
acls:
- 100
- 200
ipv6:
address:
acl: test_acl_20
route_type:
level_1: true
tag:
tag_list:
- test_match_tag
track: 105
- route_map: test_2
entries:
- sequence: 10
action: deny
match:
ipv6:
address:
acl: test_ip_acl
next_hop:
prefix_list: test_new
route_source:
acl: route_src_acl
security_group:
source:
- 10
- 20
local_preference:
value:
- 55
- 105
mpls_label: true
set:
aigp_metric:
value: 100
automatic_tag: true
extcommunity:
cost:
id: 10
cost_value: 100
pre_bestpath: true
ip:
address: 192.0.2.1
df: 1
next_hop:
recursive:
global_route: true
address: 198.51.110.1
verify_availability:
address: 198.51.111.1
sequence: 100
track: 10
precedence:
critical: true
state: merged
# Commands Fired:
# ---------------
#
# "commands": [
# "route-map test_2 deny 10",
# "match security-group source tag 10 20",
# "match local-preference 55 105",
# "match mpls-label",
# "match ipv6 next-hop prefix-list test_new",
# "match ipv6 route-source route_src_acl",
# "match ipv6 address test_ip_acl",
# "set extcommunity cost pre-bestpath 10 100",
# "set ip df 1",
# "set ip next-hop recursive global 198.51.110.1",
# "set ip next-hop verify-availability 198.51.111.1 100 track 10",
# "set ip precedence critical",
# "set ip address prefix-list 192.0.2.1",
# "set automatic-tag",
# "set aigp-metric 100",
# "route-map test_1 deny 20",
# "continue 100",
# "match track 105",
# "match tag list test_match_tag",
# "match ipv6 address test_acl_20",
# "match route-type level-1",
# "match as-path 200 100",
# "match additional-paths advertise-set all group-best",
# "route-map test_1 deny 10",
# "description this is test route",
# "match security-group source tag 10 20",
# "match ip next-hop prefix-list test_2_new test_1_new",
# "match ip route-source 10",
# "match local-preference 100 50",
# "match mpls-label"
# ]
# After state:
# -------------
#
# router-ios#sh running-config | section ^route-map
# route-map test_1 deny 10
# description this is test route
# match ip next-hop prefix-list test_2_new test_1_new
# match ip route-source 10
# match security-group source tag 10 20
# match local-preference 100 50
# match mpls-label
# route-map test_1 deny 20
# match track 105
# match tag list test_match_tag
# match route-type level-1
# match additional-paths advertise-set all group-best
# match as-path 200 100
# match ipv6 address test_acl_20
# continue 100
# route-map test_2 deny 10
# match security-group source tag 10 20
# match local-preference 55 105
# match mpls-label
# match ipv6 address test_ip_acl
# match ipv6 next-hop prefix-list test_new
# match ipv6 route-source route_src_acl
# set automatic-tag
# set ip precedence critical
# set ip address prefix-list 192.0.2.1
# set aigp-metric 100
# set extcommunity cost pre-bestpath 10 100
# set ip df 1
# set ip next-hop verify-availability 198.51.111.1 100 track 10
# set ip next-hop recursive global 198.51.110.1
# Using overridden
# Before state:
# -------------
#
# router-ios#sh running-config | section ^route-map
# route-map test_1 deny 10
# description this is test route
# match ip next-hop prefix-list test_2_new test_1_new
# match ip route-source 10
# match security-group source tag 10 20
# match local-preference 100 50
# match mpls-label
# route-map test_1 deny 20
# match track 105
# match tag list test_match_tag
# match route-type level-1
# match additional-paths advertise-set all group-best
# match as-path 200 100
# match ipv6 address test_acl_20
# continue 100
# route-map test_2 deny 10
# match security-group source tag 10 20
# match local-preference 55 105
# match mpls-label
# match ipv6 address test_ip_acl
# match ipv6 next-hop prefix-list test_new
# match ipv6 route-source route_src_acl
# set automatic-tag
# set ip precedence critical
# set ip address prefix-list 192.0.2.1
# set aigp-metric 100
# set extcommunity cost pre-bestpath 10 100
# set ip df 1
# set ip next-hop verify-availability 198.51.111.1 100 track 10
# set ip next-hop recursive global 198.51.110.1
- name: Override provided Route maps configuration
cisco.ios.ios_route_maps:
config:
- route_map: test_1
entries:
- sequence: 10
action: deny
description: this is override route
match:
ip:
next_hop:
acls:
- 10
- test1_acl
flowspec:
dest_pfx: true
acls:
- test_acl_1
- test_acl_2
length:
minimum: 10
maximum: 100
metric:
value: 10
external: true
security_group:
source:
- 10
- 20
mpls_label: true
set:
extcommunity:
vpn_distinguisher:
address: 192.0.2.1:12
additive: true
metric:
metric_value: 100
deviation: plus
eigrp_delay: 100
metric_reliability: 10
metric_bandwidth: 20
mtu: 30
- route_map: test_override
entries:
- sequence: 10
action: deny
match:
ipv6:
address:
acl: test_acl
next_hop:
prefix_list: test_new
route_source:
acl: route_src_acl
security_group:
source:
- 15
- 20
local_preference:
value:
- 105
- 110
mpls_label: true
set:
aigp_metric:
value: 100
automatic_tag: true
extcommunity:
cost:
id: 10
cost_value: 100
pre_bestpath: true
ip:
address: 192.0.2.1
df: 1
next_hop:
recursive:
global_route: true
address: 198.110.51.1
verify_availability:
address: 198.110.51.2
sequence: 100
track: 10
precedence:
critical: true
state: overridden
# Commands Fired:
# ---------------
#
# "commands": [
# "no route-map test_2",
# "route-map test_override deny 10",
# "match security-group source tag 15 20",
# "match local-preference 110 105",
# "match mpls-label",
# "match ipv6 next-hop prefix-list test_new",
# "match ipv6 route-source route_src_acl",
# "match ipv6 address test_acl",
# "set extcommunity cost pre-bestpath 10 100",
# "set ip df 1",
# "set ip next-hop recursive global 198.110.51.1",
# "set ip next-hop verify-availability 198.110.51.2 100 track 10",
# "set ip precedence critical",
# "set ip address prefix-list 192.0.2.1",
# "set automatic-tag",
# "set aigp-metric 100",
# "route-map test_1 deny 10",
# "no description this is test route",
# "description this is override route",
# "match ip flowspec dest-pfx test_acl_1 test_acl_2",
# "no match ip next-hop prefix-list test_2_new test_1_new",
# "match ip next-hop test1_acl 10",
# "no match ip route-source 10",
# "match metric external 10",
# "match length 10 100",
# "no match local-preference 100 50",
# "set extcommunity vpn-distinguisher 192.0.2.1:12 additive",
# "set metric 100 +100 10 20 30",
# "no route-map test_1 deny 20"
# ]
# After state:
# -------------
#
# router-ios#sh running-config | section ^route-map
# route-map test_override deny 10
# match security-group source tag 15 20
# match local-preference 110 105
# match mpls-label
# match ipv6 address test_acl
# match ipv6 next-hop prefix-list test_new
# match ipv6 route-source route_src_acl
# set automatic-tag
# set ip precedence critical
# set ip address prefix-list 192.0.2.1
# set aigp-metric 100
# set extcommunity cost pre-bestpath 10 100
# set ip df 1
# set ip next-hop verify-availability 198.110.51.2 100 track 10
# set ip next-hop recursive global 198.110.51.1
# route-map test_1 deny 10
# description this is override route
# match ip flowspec dest-pfx test_acl_1 test_acl_2
# match ip next-hop test1_acl 10
# match security-group source tag 10 20
# match metric external 10
# match mpls-label
# match length 10 100
# set metric 100 +100 10 20 30
# set extcommunity vpn-distinguisher 192.0.2.1:12 additive
# Using replaced
# Before state:
# -------------
#
# router-ios#sh running-config | section ^route-map
# route-map test_1 deny 10
# description this is test route
# match ip next-hop prefix-list test_2_new test_1_new
# match ip route-source 10
# match security-group source tag 10 20
# match local-preference 100 50
# match mpls-label
# route-map test_1 deny 20
# match track 105
# match tag list test_match_tag
# match route-type level-1
# match additional-paths advertise-set all group-best
# match as-path 200 100
# match ipv6 address test_acl_20
# continue 100
# route-map test_2 deny 10
# match security-group source tag 10 20
# match local-preference 55 105
# match mpls-label
# match ipv6 address test_ip_acl
# match ipv6 next-hop prefix-list test_new
# match ipv6 route-source route_src_acl
# set automatic-tag
# set ip precedence critical
# set ip address prefix-list 192.0.2.1
# set aigp-metric 100
# set extcommunity cost pre-bestpath 10 100
# set ip df 1
# set ip next-hop verify-availability 198.51.111.1 100 track 10
# set ip next-hop recursive global 198.51.110.1
- name: Replaced provided Route maps configuration
cisco.ios.ios_route_maps:
config:
- route_map: test_1
entries:
- sequence: 10
action: deny
description: this is replaced route
match:
ip:
next_hop:
acls:
- 10
- test1_acl
flowspec:
dest_pfx: true
acls:
- test_acl_1
- test_acl_2
length:
minimum: 10
maximum: 100
metric:
value: 10
external: true
security_group:
source:
- 10
- 20
mpls_label: true
set:
extcommunity:
vpn_distinguisher:
address: 192.0.2.1:12
additive: true
metric:
metric_value: 100
deviation: plus
eigrp_delay: 100
metric_reliability: 10
metric_bandwidth: 20
mtu: 30
- route_map: test_replaced
entries:
- sequence: 10
action: deny
match:
ipv6:
address:
acl: test_acl
next_hop:
prefix_list: test_new
route_source:
acl: route_src_acl
security_group:
source:
- 15
- 20
local_preference:
value:
- 105
- 110
mpls_label: true
set:
aigp_metric:
value: 100
automatic_tag: true
extcommunity:
cost:
id: 10
cost_value: 100
pre_bestpath: true
ip:
address: 192.0.2.1
df: 1
next_hop:
recursive:
global_route: true
address: 198.110.51.1
verify_availability:
address: 198.110.51.2
sequence: 100
track: 10
precedence:
critical: true
state: replaced
# Commands Fired:
# ---------------
# "commands": [
# "route-map test_replaced deny 10",
# "match security-group source tag 15 20",
# "match local-preference 110 105",
# "match mpls-label",
# "match ipv6 next-hop prefix-list test_new",
# "match ipv6 route-source route_src_acl",
# "match ipv6 address test_acl",
# "set extcommunity cost pre-bestpath 10 100",
# "set ip df 1",
# "set ip next-hop recursive global 198.110.51.1",
# "set ip next-hop verify-availability 198.110.51.2 100 track 10",
# "set ip precedence critical",
# "set ip address prefix-list 192.0.2.1",
# "set automatic-tag",
# "set aigp-metric 100",
# "route-map test_1 deny 10",
# "no description this is test route",
# "description this is replaced route",
# "match ip flowspec dest-pfx test_acl_1 test_acl_2",
# "no match ip next-hop prefix-list test_2_new test_1_new",
# "match ip next-hop test1_acl 10",
# "no match ip route-source 10",
# "match metric external 10",
# "match length 10 100",
# "no match local-preference 100 50",
# "set extcommunity vpn-distinguisher 192.0.2.1:12 additive",
# "set metric 100 +100 10 20 30",
# "no route-map test_1 deny 20"
# ]
# After state:
# -------------
#
# router-ios#sh running-config | section ^route-map
# route-map test_replaced deny 10
# match security-group source tag 15 20
# match local-preference 110 105
# match mpls-label
# match ipv6 address test_acl
# match ipv6 next-hop prefix-list test_new
# match ipv6 route-source route_src_acl
# set automatic-tag
# set ip precedence critical
# set ip address prefix-list 192.0.2.1
# set aigp-metric 100
# set extcommunity cost pre-bestpath 10 100
# set ip df 1
# set ip next-hop verify-availability 198.110.51.2 100 track 10
# set ip next-hop recursive global 198.110.51.1
# route-map test_1 deny 10
# description this is replaced route
# match ip flowspec dest-pfx test_acl_1 test_acl_2
# match ip next-hop test1_acl 10
# match security-group source tag 10 20
# match metric external 10
# match mpls-label
# match length 10 100
# set metric 100 +100 10 20 30
# set extcommunity vpn-distinguisher 192.0.2.1:12 additive
# route-map test_2 deny 10
# match security-group source tag 10 20
# match local-preference 55 105
# match mpls-label
# match ipv6 address test_ip_acl
# match ipv6 next-hop prefix-list test_new
# match ipv6 route-source route_src_acl
# set automatic-tag
# set ip precedence critical
# set ip address prefix-list 192.0.2.1
# set aigp-metric 100
# set extcommunity cost pre-bestpath 10 100
# set ip df 1
# set ip next-hop verify-availability 198.51.111.1 100 track 10
# set ip next-hop recursive global 198.51.110.1
# Using Gathered
# Before state:
# -------------
#
# router-ios#sh running-config | section ^route-map
# route-map test_1 deny 10
# description this is test route
# match ip next-hop prefix-list test_2_new test_1_new
# match ip route-source 10
# match security-group source tag 10 20
# match local-preference 100 50
# match mpls-label
# route-map test_1 deny 20
# match track 105
# match tag list test_match_tag
# match route-type level-1
# match additional-paths advertise-set all group-best
# match as-path 200 100
# match ipv6 address test_acl_20
# continue 100
# route-map test_2 deny 10
# match security-group source tag 10 20
# match local-preference 55 105
# match mpls-label
# match ipv6 address test_ip_acl
# match ipv6 next-hop prefix-list test_new
# match ipv6 route-source route_src_acl
# set automatic-tag
# set ip precedence critical
# set ip address prefix-list 192.0.2.1
# set aigp-metric 100
# set extcommunity cost pre-bestpath 10 100
# set ip df 1
# set ip next-hop verify-availability 198.51.111.1 100 track 10
# set ip next-hop recursive global 198.51.110.1
- name: Gather Route maps provided configurations
cisco.ios.ios_route_maps:
config:
state: gathered
# Module Execution Result:
# ------------------------
#
# "gathered": [
# {
# "entries": [
# {
# "action": "deny",
# "description": "this is test route",
# "match": {
# "ip": {
# "next_hop": {
# "prefix_lists": [
# "test_2_new",
# "test_1_new"
# ]
# },
# "route_source": {
# "acls": [
# "10"
# ]
# }
# },
# "local_preference": {
# "value": [
# "100",
# "50"
# ]
# },
# "mpls_label": true,
# "security_group": {
# "source": [
# 10,
# 20
# ]
# }
# },
# "sequence": 10
# },
# {
# "action": "deny",
# "continue_entry": {
# "entry_sequence": 100
# },
# "match": {
# "additional_paths": {
# "all": true,
# "group_best": true
# },
# "as_path": {
# "acls": [
# 200,
# 100
# ]
# },
# "ipv6": {
# "address": {
# "acl": "test_acl_20"
# }
# },
# "route_type": {
# "external": {
# "set": true
# },
# "level_1": true,
# "nssa_external": {
# "set": true
# }
# },
# "tag": {
# "tag_list": [
# "test_match_tag"
# ]
# },
# "track": 105
# },
# "sequence": 20
# }
# ],
# "route_map": "test_1"
# },
# {
# "entries": [
# {
# "action": "deny",
# "match": {
# "ipv6": {
# "address": {
# "acl": "test_ip_acl"
# },
# "next_hop": {
# "prefix_list": "test_new"
# },
# "route_source": {
# "acl": "route_src_acl"
# }
# },
# "local_preference": {
# "value": [
# "55",
# "105"
# ]
# },
# "mpls_label": true,
# "security_group": {
# "source": [
# 10,
# 20
# ]
# }
# },
# "sequence": 10,
# "set": {
# "aigp_metric": {
# "value": 100
# },
# "automatic_tag": true,
# "extcommunity": {
# "cost": {
# "cost_value": 100,
# "id": "10",
# "pre_bestpath": true
# }
# },
# "ip": {
# "address": "192.0.2.1",
# "df": 1,
# "next_hop": {
# "recursive": {
# "address": "198.51.110.1",
# "global_route": true
# },
# "verify_availability": {
# "address": "198.51.111.1",
# "sequence": 100,
# "track": 10
# }
# },
# "precedence": {
# "critical": true
# }
# }
# }
# }
# ],
# "route_map": "test_2"
# }
# ]
# After state:
# ------------
#
# router-ios#sh running-config | section ^route-map
# route-map test_1 deny 10
# description this is test route
# match ip next-hop prefix-list test_2_new test_1_new
# match ip route-source 10
# match security-group source tag 10 20
# match local-preference 100 50
# match mpls-label
# route-map test_1 deny 20
# match track 105
# match tag list test_match_tag
# match route-type level-1
# match additional-paths advertise-set all group-best
# match as-path 200 100
# match ipv6 address test_acl_20
# continue 100
# route-map test_2 deny 10
# match security-group source tag 10 20
# match local-preference 55 105
# match mpls-label
# match ipv6 address test_ip_acl
# match ipv6 next-hop prefix-list test_new
# match ipv6 route-source route_src_acl
# set automatic-tag
# set ip precedence critical
# set ip address prefix-list 192.0.2.1
# set aigp-metric 100
# set extcommunity cost pre-bestpath 10 100
# set ip df 1
# set ip next-hop verify-availability 198.51.111.1 100 track 10
# set ip next-hop recursive global 198.51.110.1
# Using Rendered
- name: Render the commands for provided configuration
cisco.ios.ios_route_maps:
config:
- route_map: test_1
entries:
- sequence: 10
action: deny
description: this is test route
match:
ip:
next_hop:
prefix_lists:
- test_1_new
- test_2_new
route_source:
acls:
- 10
security_group:
source:
- 10
- 20
local_preference:
value:
- 50
- 100
mpls_label: true
- sequence: 20
action: deny
continue_entry:
entry_sequence: 100
match:
additional_paths:
all: true
group_best: true
as_path:
acls:
- 100
- 200
ipv6:
address:
acl: test_acl_20
route_type:
level_1: true
tag:
tag_list:
- test_match_tag
track: 105
- route_map: test_2
entries:
- sequence: 10
action: deny
match:
ipv6:
address:
acl: test_ip_acl
next_hop:
prefix_list: test_new
route_source:
acl: route_src_acl
security_group:
source:
- 10
- 20
local_preference:
value:
- 55
- 105
mpls_label: true
set:
aigp_metric:
value: 100
automatic_tag: true
extcommunity:
cost:
id: 10
cost_value: 100
pre_bestpath: true
ip:
address: 192.0.2.1
df: 1
next_hop:
recursive:
global_route: true
address: 198.51.110.1
verify_availability:
address: 198.51.111.1
sequence: 100
track: 10
precedence:
critical: true
state: rendered
# Module Execution Result:
# ------------------------
#
# "rendered": [
# "route-map test_2 deny 10",
# "match security-group source tag 10 20",
# "match local-preference 55 105",
# "match mpls-label",
# "match ipv6 next-hop prefix-list test_new",
# "match ipv6 route-source route_src_acl",
# "match ipv6 address test_ip_acl",
# "set extcommunity cost pre-bestpath 10 100",
# "set ip df 1",
# "set ip next-hop recursive global 198.51.110.1",
# "set ip next-hop verify-availability 198.51.111.1 100 track 10",
# "set ip precedence critical",
# "set ip address prefix-list 192.0.2.1",
# "set automatic-tag",
# "set aigp-metric 100",
# "route-map test_1 deny 20",
# "continue 100",
# "match track 105",
# "match tag list test_match_tag",
# "match ipv6 address test_acl_20",
# "match route-type level-1",
# "match as-path 200 100",
# "match additional-paths advertise-set all group-best",
# "route-map test_1 deny 10",
# "description this is test route",
# "match security-group source tag 10 20",
# "match ip next-hop prefix-list test_2_new test_1_new",
# "match ip route-source 10",
# "match local-preference 100 50",
# "match mpls-label"
# ]
# Using Parsed
# File: parsed.cfg
# ----------------
#
# route-map test_1 deny 10
# description this is test route
# match ip next-hop prefix-list test_2_new test_1_new
# match ip route-source 10
# match security-group source tag 10 20
# match local-preference 100 50
# match mpls-label
# route-map test_1 deny 20
# match track 105
# match tag list test_match_tag
# match route-type level-1
# match additional-paths advertise-set all group-best
# match as-path 200 100
# match ipv6 address test_acl_20
# continue 100
# route-map test_2 deny 10
# match security-group source tag 10 20
# match local-preference 55 105
# match mpls-label
# match ipv6 address test_ip_acl
# match ipv6 next-hop prefix-list test_new
# match ipv6 route-source route_src_acl
# set automatic-tag
# set ip precedence critical
# set ip address prefix-list 192.0.2.1
# set aigp-metric 100
# set extcommunity cost pre-bestpath 10 100
# set ip df 1
# set ip next-hop verify-availability 198.51.111.1 100 track 10
# set ip next-hop recursive global 198.51.110.1
- name: Parse the provided configuration with the existing running configuration
cisco.ios.ios_route_maps:
running_config: "{{ lookup('file', 'parsed.cfg') }}"
state: parsed
# Module Execution Result:
# ------------------------
#
# "parsed": [
# {
# "entries": [
# {
# "action": "deny",
# "description": "this is test route",
# "match": {
# "ip": {
# "next_hop": {
# "prefix_lists": [
# "test_2_new",
# "test_1_new"
# ]
# },
# "route_source": {
# "acls": [
# "10"
# ]
# }
# },
# "local_preference": {
# "value": [
# "100",
# "50"
# ]
# },
# "mpls_label": true,
# "security_group": {
# "source": [
# 10,
# 20
# ]
# }
# },
# "sequence": 10
# },
# {
# "action": "deny",
# "continue_entry": {
# "entry_sequence": 100
# },
# "match": {
# "additional_paths": {
# "all": true,
# "group_best": true
# },
# "as_path": {
# "acls": [
# 200,
# 100
# ]
# },
# "ipv6": {
# "address": {
# "acl": "test_acl_20"
# }
# },
# "route_type": {
# "external": {
# "set": true
# },
# "level_1": true,
# "nssa_external": {
# "set": true
# }
# },
# "tag": {
# "tag_list": [
# "test_match_tag"
# ]
# },
# "track": 105
# },
# "sequence": 20
# }
# ],
# "route_map": "test_1"
# },
# {
# "entries": [
# {
# "action": "deny",
# "match": {
# "ipv6": {
# "address": {
# "acl": "test_ip_acl"
# },
# "next_hop": {
# "prefix_list": "test_new"
# },
# "route_source": {
# "acl": "route_src_acl"
# }
# },
# "local_preference": {
# "value": [
# "55",
# "105"
# ]
# },
# "mpls_label": true,
# "security_group": {
# "source": [
# 10,
# 20
# ]
# }
# },
# "sequence": 10,
# "set": {
# "aigp_metric": {
# "value": 100
# },
# "automatic_tag": true,
# "extcommunity": {
# "cost": {
# "cost_value": 100,
# "id": "10",
# "pre_bestpath": true
# }
# },
# "ip": {
# "address": "192.0.2.1",
# "df": 1,
# "next_hop": {
# "recursive": {
# "address": "198.51.110.1",
# "global_route": true
# },
# "verify_availability": {
# "address": "198.51.111.1",
# "sequence": 100,
# "track": 10
# }
# },
# "precedence": {
# "critical": true
# }
# }
# }
# }
# ],
# "route_map": "test_2"
# }
# ]
Common return values are documented here, the following are the fields unique to this module:
- Sumit Jaiswal (@justjais)