cisco.nxos.nxos_bgp_neighbor_address_family 模块 – BGP 邻居地址族资源模块。
注意
此模块是 cisco.nxos 集合 (版本 9.2.1) 的一部分。
如果您使用的是 ansible
包,则可能已经安装了此集合。它不包含在 ansible-core
中。要检查它是否已安装,请运行 ansible-galaxy collection list
。
要安装它,请使用: ansible-galaxy collection install cisco.nxos
。
要在 playbook 中使用它,请指定: cisco.nxos.nxos_bgp_neighbor_address_family
。
cisco.nxos 2.0.0 中的新增功能
概要
此模块管理在运行 Cisco NX-OS 的设备上 BGP 邻居地址族的配置。
参数
参数 |
注释 |
---|---|
BGP 邻居 AF 配置。 |
|
路由器的自治系统编号。 |
|
BGP 邻居 AF 配置列表。 |
|
BGP 邻居地址族相关配置。 |
|
指定用于条件通告的路由映射。 |
|
条件路由映射,仅当条件中的前缀存在时才通告。 |
|
条件路由映射,仅当条件中的前缀不存在时才通告。 |
|
路由映射名称。 |
|
发送 BGP 路由更新之间的最小间隔。 |
|
地址族指示符。 选项
|
|
接受其中包含我的 AS 的 AS 路径。 |
|
AS 编号出现的次数,默认为 3。 |
|
激活 allowas-in 属性。 选项
|
|
发送更新时覆盖匹配的 AS 编号。 选项
|
|
向对等体通告功能。 |
|
附加路径功能。 |
|
附加路径接收功能。 选项
|
|
附加路径发送功能。 选项
|
|
向此对等体发起默认路由。 |
|
路由映射,用于指定发起默认路由的条件。 |
|
设置 default-originate 属性。 选项
|
|
在通告时禁用对等体 AS 编号的检查。 选项
|
|
过滤器列表的名称。 |
|
将策略应用于传入路由。 |
|
将策略应用于传出路由。 |
|
继承模板。 |
|
序列号。 |
|
模板名称。 |
|
来自此邻居的最大前缀数。 |
|
生成警告的阈值百分比。 |
|
最大前缀限制。 |
|
超过限制后重新启动 bgp 连接。 |
|
仅在超过限制时发出警告消息。 选项
|
|
将我们的地址设置为 nexthop(非反射)。 |
|
将我们的地址设置为所有路由的 nexthop。 选项
|
|
设置 next-hop-self 属性。 选项
|
|
如果可能,计算第三方 nexthop。 选项
|
|
应用前缀列表。 |
|
将策略应用于传入路由。 |
|
将策略应用于传出路由。 |
|
自动为 EBGP 邻居生成 RT。 选项
|
|
自动为 EBGP 邻居生成 RT。 选项
|
|
将路由映射应用于邻居。 |
|
将策略应用于传入路由。 |
|
将策略应用于传出路由。 |
|
将邻居配置为路由反射器客户端。 选项
|
|
子地址族指示符。 选项
|
|
向此邻居发送社区属性。 |
|
发送标准和扩展社区属性。 选项
|
|
发送扩展社区属性。 选项
|
|
Set send-community attribute. 选项
|
|
发送标准社区属性。 选项
|
|
软重新配置。 |
|
始终执行传入的软重新配置。 选项
|
|
设置 soft-reconfiguration inbound 属性。 选项
|
|
指定 Site-of-origin extcommunity。 |
|
仅向对等体通告活动路由。 选项
|
|
路由映射,用于有选择地取消抑制被抑制的路由。 |
|
为来自此邻居的路由设置默认权重。 |
|
邻居的 IP/IPv6 地址。 |
|
虚拟路由上下文。 |
|
BGP 邻居 AF 配置列表。 |
|
BGP 邻居地址族相关配置。 |
|
指定用于条件通告的路由映射。 |
|
条件路由映射,仅当条件中的前缀存在时才通告。 |
|
条件路由映射,仅当条件中的前缀不存在时才通告。 |
|
路由映射名称。 |
|
发送 BGP 路由更新之间的最小间隔。 |
|
地址族指示符。 选项
|
|
接受其中包含我的 AS 的 AS 路径。 |
|
AS 编号出现的次数,默认为 3。 |
|
激活 allowas-in 属性。 选项
|
|
发送更新时覆盖匹配的 AS 编号。 选项
|
|
向对等体通告功能。 |
|
附加路径功能。 |
|
附加路径接收功能。 选项
|
|
附加路径发送功能。 选项
|
|
向此对等体发起默认路由。 |
|
路由映射,用于指定发起默认路由的条件。 |
|
设置 default-originate 属性。 选项
|
|
在通告时禁用对等体 AS 编号的检查。 选项
|
|
过滤器列表的名称。 |
|
将策略应用于传入路由。 |
|
将策略应用于传出路由。 |
|
继承模板。 |
|
序列号。 |
|
模板名称。 |
|
来自此邻居的最大前缀数。 |
|
生成警告的阈值百分比。 |
|
最大前缀限制。 |
|
超过限制后重新启动 bgp 连接。 |
|
仅在超过限制时发出警告消息。 选项
|
|
将我们的地址设置为 nexthop(非反射)。 |
|
将我们的地址设置为所有路由的 nexthop。 选项
|
|
设置 next-hop-self 属性。 选项
|
|
如果可能,计算第三方 nexthop。 选项
|
|
应用前缀列表。 |
|
将策略应用于传入路由。 |
|
将策略应用于传出路由。 |
|
自动为 EBGP 邻居生成 RT。 选项
|
|
自动为 EBGP 邻居生成 RT。 选项
|
|
将路由映射应用于邻居。 |
|
将策略应用于传入路由。 |
|
将策略应用于传出路由。 |
|
将邻居配置为路由反射器客户端。 选项
|
|
子地址族指示符。 选项
|
|
向此邻居发送社区属性。 |
|
发送标准和扩展社区属性。 选项
|
|
发送扩展社区属性。 选项
|
|
Set send-community attribute. 选项
|
|
发送标准社区属性。 选项
|
|
软重新配置。 |
|
始终执行传入的软重新配置。 选项
|
|
设置 soft-reconfiguration inbound 属性。 选项
|
|
指定 Site-of-origin extcommunity。 |
|
仅向对等体通告活动路由。 选项
|
|
路由映射,用于有选择地取消抑制被抑制的路由。 |
|
为来自此邻居的路由设置默认权重。 |
|
邻居的 IP/IPv6 地址。 |
|
VRF 名称。 |
|
此选项仅与状态 *parsed* 一起使用。 此选项的值应为通过执行命令 **show running-config | section ‘^router bgp’** 从 NX-OS 设备接收到的输出。 状态 *parsed* 从 |
|
配置应保留到的状态。 状态 *deleted* 只删除此模块管理的 BGP 属性,不会完全否定 BGP 进程。 有关更多详细信息,请参阅示例。 选项
|
备注
注意
针对 NX-OS 9.3.6 进行了测试。
不支持 Cisco MDS
要管理 BGP 地址族配置,请使用 cisco.nxos.nxos_bgp_address_family 模块。
此模块适用于连接
network_cli
和httpapi
。
示例
# Using merged
# Before state:
# -------------
# Nexus9000v# show running-config | section "^router bgp"
# Nexus9000v#
- name: Merge the provided configuration with the existing running configuration
cisco.nxos.nxos_bgp_neighbor_address_family: &id001
config:
as_number: 65536
neighbors:
- neighbor_address: 192.0.2.32
address_family:
- afi: ipv4
safi: unicast
maximum_prefix:
max_prefix_limit: 20
generate_warning_threshold: 75
weight: 100
prefix_list:
inbound: rmap1
outbound: rmap2
- afi: ipv6
safi: unicast
- neighbor_address: 192.0.2.33
address_family:
- afi: ipv4
safi: multicast
inherit:
template: BasePolicy
sequence: 200
vrfs:
- vrf: site-1
neighbors:
- neighbor_address: 203.0.113.1
address_family:
- afi: ipv4
safi: unicast
suppress_inactive: true
next_hop_self:
set: true
- neighbor_address: 203.0.113.2
address_family:
- afi: ipv6
safi: unicast
- afi: ipv4
safi: multicast
send_community:
set: true
# Task output:
# ------------
# before: {}
#
# commands:
# - router bgp 65536
# - neighbor 192.0.2.32
# - address-family ipv4 unicast
# - maximum-prefix 20 75
# - weight 100
# - prefix-list rmap1 in
# - prefix-list rmap2 out
# - address-family ipv6 unicast
# - neighbor 192.0.2.33
# - address-family ipv4 multicast
# - inherit peer-policy BasePolicy 200
# - vrf site-1
# - neighbor 203.0.113.1
# - address-family ipv4 unicast
# - suppress-inactive
# - next-hop-self
# - neighbor 203.0.113.2
# - address-family ipv6 unicast
# - address-family ipv4 multicast
# - send-community
#
# after:
# as_number: "65536"
# neighbors:
# - neighbor_address: 192.0.2.32
# address_family:
# - afi: ipv4
# safi: unicast
# maximum_prefix:
# max_prefix_limit: 20
# generate_warning_threshold: 75
# weight: 100
# prefix_list:
# inbound: rmap1
# outbound: rmap2
# - afi: ipv6
# safi: unicast
# - neighbor_address: 192.0.2.33
# address_family:
# - afi: ipv4
# safi: multicast
# inherit:
# template: BasePolicy
# sequence: 200
# vrfs:
# - vrf: site-1
# neighbors:
# - neighbor_address: 203.0.113.1
# address_family:
# - afi: ipv4
# safi: unicast
# suppress_inactive: true
# next_hop_self:
# set: true
# - neighbor_address: 203.0.113.2
# address_family:
# - afi: ipv4
# safi: multicast
# send_community:
# set: true
# - afi: ipv6
# safi: unicast
# After state:
# ------------
# Nexus9000v# show running-config | section "^router bgp"
# router bgp 65536
# neighbor 192.0.2.32
# address-family ipv4 unicast
# maximum-prefix 20 75
# weight 100
# prefix-list rmap1 in
# prefix-list rmap2 out
# address-family ipv6 unicast
# neighbor 192.0.2.33
# address-family ipv4 multicast
# inherit peer-policy BasePolicy 200
# vrf site-1
# neighbor 203.0.113.1
# address-family ipv4 unicast
# suppress-inactive
# next-hop-self
# neighbor 203.0.113.2
# address-family ipv4 multicast
# send-community
# address-family ipv6 unicast
#
# Using replaced
# Before state:
# -------------
# Nexus9000v# show running-config | section "^router bgp"
# router bgp 65536
# neighbor 192.0.2.32
# address-family ipv4 unicast
# maximum-prefix 20 75
# weight 100
# prefix-list rmap1 in
# prefix-list rmap2 out
# address-family ipv6 unicast
# neighbor 192.0.2.33
# address-family ipv4 multicast
# inherit peer-policy BasePolicy 200
# vrf site-1
# neighbor 203.0.113.1
# address-family ipv4 unicast
# suppress-inactive
# next-hop-self
# neighbor 203.0.113.2
# address-family ipv4 multicast
# send-community
# address-family ipv6 unicast
#
- name: Replace specified neighbor AFs with given configuration
cisco.nxos.nxos_bgp_neighbor_address_family: &replaced
config:
as_number: 65536
neighbors:
- neighbor_address: 192.0.2.32
address_family:
- afi: ipv4
safi: unicast
weight: 110
- afi: ipv6
safi: unicast
- neighbor_address: 192.0.2.33
address_family:
- afi: ipv4
safi: multicast
inherit:
template: BasePolicy
sequence: 200
vrfs:
- vrf: site-1
neighbors:
- neighbor_address: 203.0.113.1
address_family:
- afi: ipv4
safi: unicast
- neighbor_address: 203.0.113.2
address_family:
- afi: ipv6
safi: unicast
- afi: ipv4
safi: multicast
send_community:
set: true
state: replaced
# Task output:
# ------------
# before:
# as_number: "65536"
# neighbors:
# - neighbor_address: 192.0.2.32
# address_family:
# - afi: ipv4
# safi: unicast
# maximum_prefix:
# max_prefix_limit: 20
# generate_warning_threshold: 75
# weight: 100
# prefix_list:
# inbound: rmap1
# outbound: rmap2
# - afi: ipv6
# safi: unicast
# - neighbor_address: 192.0.2.33
# address_family:
# - afi: ipv4
# safi: multicast
# inherit:
# template: BasePolicy
# sequence: 200
# vrfs:
# - vrf: site-1
# neighbors:
# - neighbor_address: 203.0.113.1
# address_family:
# - afi: ipv4
# safi: unicast
# suppress_inactive: true
# next_hop_self:
# set: true
# - neighbor_address: 203.0.113.2
# address_family:
# - afi: ipv4
# safi: multicast
# send_community:
# set: true
# - afi: ipv6
# safi: unicast
#
# commands:
# - router bgp 65536
# - neighbor 192.0.2.32
# - address-family ipv4 unicast
# - no maximum-prefix 20 75
# - weight 110
# - no prefix-list rmap1 in
# - no prefix-list rmap2 out
# - vrf site-1
# - neighbor 203.0.113.1
# - address-family ipv4 unicast
# - no suppress-inactive
# - no next-hop-self
#
# after:
# as_number: "65536"
# neighbors:
# - neighbor_address: 192.0.2.32
# address_family:
# - afi: ipv4
# safi: unicast
# weight: 110
# - afi: ipv6
# safi: unicast
# - neighbor_address: 192.0.2.33
# address_family:
# - afi: ipv4
# safi: multicast
# inherit:
# template: BasePolicy
# sequence: 200
# vrfs:
# - vrf: site-1
# neighbors:
# - neighbor_address: 203.0.113.1
# address_family:
# - afi: ipv4
# safi: unicast
# - neighbor_address: 203.0.113.2
# address_family:
# - afi: ipv4
# safi: multicast
# send_community:
# set: true
# - afi: ipv6
# safi: unicast
# After state:
# ------------
# Nexus9000v# show running-config | section "^router bgp"
# router bgp 65536
# neighbor 192.0.2.32
# address-family ipv4 unicast
# weight 110
# address-family ipv6 unicast
# neighbor 192.0.2.33
# address-family ipv4 multicast
# inherit peer-policy BasePolicy 200
# vrf site-1
# neighbor 203.0.113.1
# address-family ipv4 unicast
# neighbor 203.0.113.2
# address-family ipv4 multicast
# send-community
# address-family ipv6 unicast
#
# Using overridden
# Before state:
# -------------
# Nexus9000v# show running-config | section "^router bgp"
# router bgp 65536
# neighbor 192.0.2.32
# address-family ipv4 unicast
# maximum-prefix 20 75
# weight 100
# prefix-list rmap1 in
# prefix-list rmap2 out
# address-family ipv6 unicast
# neighbor 192.0.2.33
# address-family ipv4 multicast
# inherit peer-policy BasePolicy 200
# vrf site-1
# neighbor 203.0.113.1
# address-family ipv4 unicast
# suppress-inactive
# next-hop-self
# neighbor 203.0.113.2
# address-family ipv4 multicast
# send-community
# address-family ipv6 unicast
#
- name: Override all BGP AF configuration with provided configuration
cisco.nxos.nxos_bgp_neighbor_address_family:
config:
as_number: 65536
neighbors:
- neighbor_address: 192.0.2.32
address_family:
- afi: ipv4
safi: unicast
vrfs:
- vrf: site-1
neighbors:
- neighbor_address: 203.0.113.1
address_family:
- afi: ipv4
safi: unicast
suppress_inactive: true
next_hop_self:
set: true
state: overridden
# Task output:
# ------------
# before:
# as_number: "65536"
# neighbors:
# - neighbor_address: 192.0.2.32
# address_family:
# - afi: ipv4
# safi: unicast
# maximum_prefix:
# max_prefix_limit: 20
# generate_warning_threshold: 75
# weight: 100
# prefix_list:
# inbound: rmap1
# outbound: rmap2
# - afi: ipv6
# safi: unicast
# - neighbor_address: 192.0.2.33
# address_family:
# - afi: ipv4
# safi: multicast
# inherit:
# template: BasePolicy
# sequence: 200
# vrfs:
# - vrf: site-1
# neighbors:
# - neighbor_address: 203.0.113.1
# address_family:
# - afi: ipv4
# safi: unicast
# suppress_inactive: true
# next_hop_self:
# set: true
# - neighbor_address: 203.0.113.2
# address_family:
# - afi: ipv4
# safi: multicast
# send_community:
# set: true
# - afi: ipv6
# safi: unicast
#
# commands:
# - router bgp 65536
# - neighbor 192.0.2.32
# - address-family ipv4 unicast
# - no maximum-prefix 20 75
# - no weight 100
# - no prefix-list rmap1 in
# - no prefix-list rmap2 out
# - no address-family ipv6 unicast
# - neighbor 192.0.2.33
# - no address-family ipv4 multicast
# - vrf site-1
# - neighbor 203.0.113.2
# - no address-family ipv4 multicast
# - no address-family ipv6 unicast
#
# after:
# as_number: "65536"
# neighbors:
# - neighbor_address: 192.0.2.32
# address_family:
# - afi: ipv4
# safi: unicast
# vrfs:
# - vrf: site-1
# neighbors:
# - neighbor_address: 203.0.113.1
# address_family:
# - afi: ipv4
# safi: unicast
# suppress_inactive: true
# next_hop_self:
# set: true
# After state:
# ------------
# Nexus9000v# show running-config | section "^router bgp"
# router bgp 65536
# neighbor 192.0.2.32
# address-family ipv4 unicast
# vrf site-1
# neighbor 203.0.113.1
# address-family ipv4 unicast
# suppress-inactive
# next-hop-self
# Using deleted to remove specified neighbor AFs
# Before state:
# -------------
# Nexus9000v# show running-config | section "^router bgp"
# router bgp 65536
# neighbor 192.0.2.32
# address-family ipv4 unicast
# maximum-prefix 20 75
# weight 100
# prefix-list rmap1 in
# prefix-list rmap2 out
# address-family ipv6 unicast
# neighbor 192.0.2.33
# address-family ipv4 multicast
# inherit peer-policy BasePolicy 200
# vrf site-1
# neighbor 203.0.113.1
# address-family ipv4 unicast
# suppress-inactive
# next-hop-self
# neighbor 203.0.113.2
# address-family ipv4 multicast
# send-community
# address-family ipv6 unicast
#
- name: Delete BGP configs handled by this module
cisco.nxos.nxos_bgp_neighbor_address_family:
config:
as_number: 65536
neighbors:
- neighbor_address: 192.0.2.32
address_family:
- afi: ipv4
safi: unicast
vrfs:
- vrf: site-1
neighbors:
- neighbor_address: 203.0.113.2
address_family:
- afi: ipv6
safi: unicast
state: deleted
# Task output:
# ------------
# before:
# as_number: "65536"
# neighbors:
# - neighbor_address: 192.0.2.32
# address_family:
# - afi: ipv4
# safi: unicast
# maximum_prefix:
# max_prefix_limit: 20
# generate_warning_threshold: 75
# weight: 100
# prefix_list:
# inbound: rmap1
# outbound: rmap2
# - afi: ipv6
# safi: unicast
# - neighbor_address: 192.0.2.33
# address_family:
# - afi: ipv4
# safi: multicast
# inherit:
# template: BasePolicy
# sequence: 200
# vrfs:
# - vrf: site-1
# neighbors:
# - neighbor_address: 203.0.113.1
# address_family:
# - afi: ipv4
# safi: unicast
# suppress_inactive: true
# next_hop_self:
# set: true
# - neighbor_address: 203.0.113.2
# address_family:
# - afi: ipv4
# safi: multicast
# send_community:
# set: true
# - afi: ipv6
# safi: unicast
#
# commands:
# - router bgp 65536
# - neighbor 192.0.2.32
# - no address-family ipv4 unicast
# - vrf site-1
# - neighbor 203.0.113.2
# - no address-family ipv6 unicast
#
# after:
# as_number: "65536"
# neighbors:
# - neighbor_address: 192.0.2.32
# address_family:
# - afi: ipv6
# safi: unicast
# - neighbor_address: 192.0.2.33
# address_family:
# - afi: ipv4
# safi: multicast
# inherit:
# template: BasePolicy
# sequence: 200
# vrfs:
# - vrf: site-1
# neighbors:
# - neighbor_address: 203.0.113.1
# address_family:
# - afi: ipv4
# safi: unicast
# suppress_inactive: true
# next_hop_self:
# set: true
# - neighbor_address: 203.0.113.2
# address_family:
# - afi: ipv4
# safi: multicast
# send_community:
# set: true
#
# After state:
# ------------
# Nexus9000v# show running-config | section "^router bgp"
# router bgp 65536
# neighbor 192.0.2.32
# address-family ipv6 unicast
# neighbor 192.0.2.33
# address-family ipv4 multicast
# inherit peer-policy BasePolicy 200
# vrf site-1
# neighbor 203.0.113.1
# address-family ipv4 unicast
# suppress-inactive
# next-hop-self
# neighbor 203.0.113.2
# address-family ipv4 multicast
# send-community
#
# Using deleted to remove all neighbor AFs
# Before state:
# -------------
# Nexus9000v# show running-config | section "^router bgp"
# router bgp 65536
# neighbor 192.0.2.32
# address-family ipv4 unicast
# maximum-prefix 20 75
# weight 100
# prefix-list rmap1 in
# prefix-list rmap2 out
# address-family ipv6 unicast
# neighbor 192.0.2.33
# address-family ipv4 multicast
# inherit peer-policy BasePolicy 200
# vrf site-1
# neighbor 203.0.113.1
# address-family ipv4 unicast
# suppress-inactive
# next-hop-self
# neighbor 203.0.113.2
# address-family ipv4 multicast
# send-community
# address-family ipv6 unicast
#
- name: Delete all BGP neighbor AF configs handled by this module
cisco.nxos.nxos_bgp_neighbor_address_family:
state: deleted
# Task output:
# ------------
# before:
# as_number: "65536"
# neighbors:
# - neighbor_address: 192.0.2.32
# address_family:
# - afi: ipv4
# safi: unicast
# maximum_prefix:
# max_prefix_limit: 20
# generate_warning_threshold: 75
# weight: 100
# prefix_list:
# inbound: rmap1
# outbound: rmap2
# - afi: ipv6
# safi: unicast
# - neighbor_address: 192.0.2.33
# address_family:
# - afi: ipv4
# safi: multicast
# inherit:
# template: BasePolicy
# sequence: 200
# vrfs:
# - vrf: site-1
# neighbors:
# - neighbor_address: 203.0.113.1
# address_family:
# - afi: ipv4
# safi: unicast
# suppress_inactive: true
# next_hop_self:
# set: true
# - neighbor_address: 203.0.113.2
# address_family:
# - afi: ipv4
# safi: multicast
# send_community:
# set: true
# - afi: ipv6
# safi: unicast
#
# commands:
# - router bgp 65536
# - neighbor 192.0.2.32
# - no address-family ipv4 unicast
# - no address-family ipv6 unicast
# - neighbor 192.0.2.33
# - no address-family ipv4 multicast
# - vrf site-1
# - neighbor 203.0.113.1
# - no address-family ipv4 unicast
# - neighbor 203.0.113.2
# - no address-family ipv6 unicast
# - no address-family ipv4 multicast
#
# after:
# as_number: "65536"
#
# After state:
# ------------
# Nexus9000v# show running-config | section "^router bgp"
# router bgp 65536
# neighbor 192.0.2.32
# neighbor 192.0.2.33
# vrf site-1
# neighbor 203.0.113.1
# neighbor 203.0.113.2
#
# Using rendered
- name: Render platform specific configuration lines with state rendered (without connecting to the device)
cisco.nxos.nxos_bgp_neighbor_address_family:
config:
as_number: 65536
neighbors:
- neighbor_address: 192.0.2.32
address_family:
- afi: ipv4
safi: unicast
maximum_prefix:
max_prefix_limit: 20
generate_warning_threshold: 75
weight: 100
prefix_list:
inbound: rmap1
outbound: rmap2
- afi: ipv6
safi: unicast
- neighbor_address: 192.0.2.33
address_family:
- afi: ipv4
safi: multicast
inherit:
template: BasePolicy
sequence: 200
vrfs:
- vrf: site-1
neighbors:
- neighbor_address: 203.0.113.1
address_family:
- afi: ipv4
safi: unicast
suppress_inactive: true
next_hop_self:
set: true
- neighbor_address: 203.0.113.2
address_family:
- afi: ipv6
safi: unicast
- afi: ipv4
safi: multicast
send_community:
set: true
state: rendered
# Task output:
# ------------
# rendered:
# - router bgp 65536
# - neighbor 192.0.2.32
# - address-family ipv4 unicast
# - maximum-prefix 20 75
# - weight 100
# - prefix-list rmap1 in
# - prefix-list rmap2 out
# - address-family ipv6 unicast
# - neighbor 192.0.2.33
# - address-family ipv4 multicast
# - inherit peer-policy BasePolicy 200
# - vrf site-1
# - neighbor 203.0.113.1
# - address-family ipv4 unicast
# - suppress-inactive
# - next-hop-self
# - neighbor 203.0.113.2
# - address-family ipv6 unicast
# - address-family ipv4 multicast
# - send-community
# Using parsed
# parsed.cfg
# ------------
# router bgp 65536
# neighbor 192.0.2.32
# address-family ipv4 unicast
# maximum-prefix 20 75
# weight 100
# prefix-list rmap1 in
# prefix-list rmap2 out
# address-family ipv6 unicast
# neighbor 192.0.2.33
# address-family ipv4 multicast
# inherit peer-policy BasePolicy 200
# vrf site-1
# neighbor 203.0.113.1
# address-family ipv4 unicast
# suppress-inactive
# next-hop-self
# neighbor 203.0.113.2
# address-family ipv4 multicast
# send-community
# address-family ipv6 unicast
- name: Parse externally provided BGP neighbor AF config
register: result
cisco.nxos.nxos_bgp_neighbor_address_family:
running_config: "{{ lookup('file', 'parsed.cfg') }}"
state: parsed
# Task output:
# ------------
# parsed:
# as_number: "65536"
# neighbors:
# - neighbor_address: 192.0.2.32
# address_family:
# - afi: ipv4
# safi: unicast
# maximum_prefix:
# max_prefix_limit: 20
# generate_warning_threshold: 75
# weight: 100
# prefix_list:
# inbound: rmap1
# outbound: rmap2
# - afi: ipv6
# safi: unicast
# - neighbor_address: 192.0.2.33
# address_family:
# - afi: ipv4
# safi: multicast
# inherit:
# template: BasePolicy
# sequence: 200
# vrfs:
# - vrf: site-1
# neighbors:
# - neighbor_address: 203.0.113.1
# address_family:
# - afi: ipv4
# safi: unicast
# suppress_inactive: true
# next_hop_self:
# set: true
# - neighbor_address: 203.0.113.2
# address_family:
# - afi: ipv4
# safi: multicast
# send_community:
# set: true
# - afi: ipv6
# safi: unicast
返回值
常见的返回值已在此处记录,以下是此模块独有的字段
键 |
描述 |
---|---|
模块执行后的最终配置。 返回值:发生更改时 示例: |
|
模块执行之前的配置。 返回值:当state 为 示例: |
|
推送到远程设备的命令集。 返回值:当state 为 示例: |
|
从远程设备收集到的关于网络资源的结构化数据事实。 返回值:当state 为 示例: |
|
根据模块argspec解析的,在running_config选项中提供的设备原生配置的结构化数据。 返回值:当state 为 示例: |
|
以设备原生格式呈现的任务中提供的配置(离线)。 返回值:当state 为 示例: |