cisco.iosxr.iosxr_ospfv2 模块 – 用于配置 OSPFv2 的资源模块。
注意
此模块是 cisco.iosxr 集合(版本 10.2.2)的一部分。
如果您正在使用 ansible
包,则可能已经安装了此集合。它不包含在 ansible-core
中。要检查是否已安装,请运行 ansible-galaxy collection list
。
要安装它,请使用:ansible-galaxy collection install cisco.iosxr
。
要在 playbook 中使用它,请指定:cisco.iosxr.iosxr_ospfv2
。
cisco.iosxr 1.0.0 中的新增功能
概要
此模块管理运行 Cisco IOS-XR 的设备上的全局 OSPFv2 配置
参数
参数 |
注释 |
---|---|
OSPFv2 进程配置列表 |
|
OSPFv2 实例配置列表 |
|
为 ipv4 地址族启用单播拓扑 选项
|
|
交错 OSPFv2 邻接关系建立 |
|
禁用交错 OSPFv2 邻接关系 选项
|
|
要建立的最大同时邻居数 |
|
每个区域要建立的初始邻居数(默认为 2) |
|
启用接口下配置的权重以进行负载共享 |
|
用于计算的参考带宽(Mbits/秒) |
|
指定未在接口下配置时要使用的默认权重值 |
|
配置 OSPFv2 区域的属性 |
|
作为 IP 地址或整数的区域 ID |
|
启用身份验证 |
|
指定密钥链名称 |
|
使用消息摘要身份验证 |
|
指定密钥链名称 |
|
不使用身份验证 选项
|
|
用于提及身份验证密码(密钥) |
|
指定将跟随一个未加密的密码(密钥) |
|
指定将跟随一个加密的密码(密钥) |
|
OSPFv2 密码(密钥) |
|
配置 BFD 参数 |
|
配置快速检测 |
|
仅启用快速检测 选项
|
|
保持邻居会话直到 BFD 会话启动 选项
|
|
以毫秒为单位的 Hello 间隔 |
|
检测乘数 |
|
接口成本 |
|
声明邻居死亡后的间隔 |
|
设置 NSSA/stub 区域的摘要默认成本。Stub 的通告外部路由度量 |
|
HELLO 数据包之间的时间 |
|
配置 MPLS 路由协议参数 |
|
配置 LDP 参数 |
|
启用 LDP IGP 接口自动配置 选项
|
|
启用 LDP IGP 同步 选项
|
|
用于 igp-shortcut 隧道的 LDP 同步 选项
|
|
配置 OSPF 区域以运行 MPLS 流量工程 选项
|
|
启用/禁用 DBD 数据包中忽略 MTU 选项
|
|
区域的 NSSA 设置 |
|
发起默认类型 7 LSA |
|
OSPFv2 默认度量 |
|
默认路由的度量类型 |
|
不要将重新分配的 LSA 发送到 NSSA 区域 选项
|
|
不要将摘要 LSA 发送到 NSSA 区域 选项
|
|
将区域配置为 NSSA 选项
|
|
转换 LSA |
|
从类型 7 转换为类型 5 |
|
始终转换 LSA 选项
|
|
汇总匹配地址/掩码的路由(仅限边界路由器) |
|
前缀格式的 IP (x.x.x.x/len) |
|
通告此范围(默认) 选项
|
|
不通告此范围 选项
|
|
指定用于过滤类型 3 LSA 的路由策略(列表只能有一个入站和/或一个出站策略) |
|
指定入站或出站 选项
|
|
指定策略的参数值 |
|
用于将区域配置为 stub 的设置 |
|
不要将摘要 LSA 发送到 stub 区域 选项
|
|
将区域配置为 stub 选项
|
|
发送链路状态更新数据包所需的估计时间 |
|
定义虚拟链路 |
|
启用身份验证 |
|
指定密钥链名称 |
|
使用消息摘要身份验证 |
|
指定密钥链名称 |
|
不使用身份验证 选项
|
|
用于提及身份验证密码(密钥) |
|
指定将跟随一个未加密的密码(密钥) |
|
指定将跟随一个加密的密码(密钥) |
|
OSPFv2 密码(密钥) |
|
声明邻居死亡后的间隔 |
|
HELLO 数据包之间的时间 |
|
虚拟链路邻居的路由器 ID (A.B.C.D) |
|
消息摘要身份验证密码(密钥) |
|
密钥 ID (1-255) |
|
使用 MD5 算法 |
|
指定将跟随一个未加密的密码(密钥) 选项
|
|
指定将跟随一个加密的密码(密钥) 选项
|
|
OSPFv2 密码(密钥) |
|
LSA 重传之间的延迟 |
|
链路状态传输延迟 |
|
启用身份验证 |
|
指定密钥链名称 |
|
使用消息摘要身份验证 |
|
指定密钥链名称 |
|
指定消息摘要选择 选项
|
|
不使用身份验证 选项
|
|
用于提及身份验证密码(密钥) |
|
指定将跟随一个未加密的密码(密钥) 选项
|
|
指定将跟随一个加密的密码(密钥) 选项
|
|
OSPFv2 密码(密钥) |
|
根据带宽计算 OSPFv2 接口成本 |
|
根据接口类型分配 OSPFv2 成本 选项
|
|
指定参考带宽,单位为兆比特每秒 |
|
配置 BFD 参数 |
|
配置快速检测 |
|
仅启用快速检测 选项
|
|
保持邻居会话直到 BFD 会话启动 选项
|
|
以毫秒为单位的 Hello 间隔 |
|
检测乘数 |
|
启用特定的 OSPFv2 功能 |
|
配置不透明 LSA |
|
禁用不透明 LSA 功能 选项
|
|
启用不透明 LSA 选项
|
|
NSSA 功能 |
|
接口开销 (1-65535) |
|
在同步和泛洪期间过滤 OSPFv2 LSA(所有传出的 LSA)。启用/禁用过滤 选项
|
|
声明邻居死亡后的间隔 |
|
发布默认路由 |
|
始终通告默认路由 选项
|
|
OSPFv2 默认度量 |
|
默认路由的 OSPFv2 度量类型 |
|
将路由策略应用于默认信息始发 |
|
启用默认路由的分发 选项
|
|
设置重新分发路由的度量值 |
|
启用/禁用 OSPFv2 按需电路 选项
|
|
定义管理距离 |
|
管理距离 |
|
访问列表名称 |
|
源 IP 地址 |
|
距离值 |
|
IP 通配符位 (A.B.C.D) |
|
OSPFv2 管理距离 |
|
外部路由的距离 |
|
区域间路由的距离 |
|
区域内路由的距离 |
|
启用向外部服务分发 LSA |
|
设置分发进程实例标识符 |
|
连续 LSA 更新之间的时间间隔 |
|
启用向外部服务分发 LSA |
|
设置分发进程实例标识符 |
|
连续 LSA 更新之间的时间间隔 |
|
过滤路由更新中的网络(列表只能有一个入站和/或一个出站策略) |
|
入站/出站访问列表 |
|
过滤传入/传出的路由更新 选项
|
|
仅为传出更新指定其他参数 |
|
对于 BGP,指定 AS 号。 2 字节 AS 号(或)asdot (X.Y) 格式的 4 字节 AS 号(或)asplain 格式的 4 字节 AS 号 对于 OSPF,指定 OSPFv2 实例名称 |
|
路由类型 选项
|
|
用于过滤 OSPFv2 前缀的路由策略(仅用于传入更新) |
|
启用/禁用通告区域内前缀作为外部 选项
|
|
启用/禁用 OSPFv2 泛洪减少 选项
|
|
HELLO 数据包之间的时间间隔(<1-65535> 秒) |
|
收到 MOSPFv2 类型 6 LSA 时不发出警告 选项
|
|
启用链路断开事件的快速或早期检测 选项
|
|
记录邻接状态更改 |
|
记录所有状态更改 选项
|
|
禁用记录邻接更改 选项
|
|
设置记录邻接 选项
|
|
将环回通告为存根网络 选项
|
|
限制非自身始发 LSA 数量的功能 |
|
设置可以抑制邻接关系的次数 |
|
设置所有邻接关系被抑制的分钟数 |
|
设置忽略计数重置为零后的分钟数 |
|
生成警告消息的阈值 (%) |
|
超出限制时记录警告消息 选项
|
|
设置最大度量值 |
|
自身始发路由器 LSA 中的最大度量值 |
|
外部 LSA 配置 |
|
设置外部 LSA 的最大度量值 |
|
设置 external-lsa 属性 选项
|
|
也为存根链路通告最大度量值 选项
|
|
仅在启动时有效 |
|
设置 on-startup 属性 选项
|
|
要等待的 BGP 的 ASN |
|
启动后等待的秒数 |
|
设置 router-lsa 属性 选项
|
|
摘要 LSA 配置 |
|
摘要 LSA 的最大度量值 |
|
设置 summary-lsa 属性 选项
|
|
消息摘要身份验证密码(密钥) |
|
密钥 ID |
|
使用 MD5 算法 |
|
指定将跟随一个未加密的密码(密钥) 选项
|
|
指定将跟随一个加密的密码(密钥) 选项
|
|
OSPFv2 密码(密钥) |
|
避免微环路 |
|
仅对受保护的前缀避免微环路 选项
|
|
在 SPF 和 RIB 更新之间引入的延迟 |
|
启用分段路由微环路避免 选项
|
|
启用 OSPFv2 路由收敛监控 |
|
启用单个前缀监控 |
|
启用跟踪外部(类型 5/7)前缀监控 选项
|
|
启用跟踪 IP-Frr 收敛 选项
|
|
启用跟踪摘要(区域间)前缀监控 选项
|
|
配置 MPLS 路由协议参数 |
|
配置 LDP 参数 |
|
启用 LDP IGP 接口自动配置 选项
|
|
启用 LDP IGP 同步 选项
|
|
用于 igp-shortcut 隧道的 LDP 同步 选项
|
|
MPLS 流量工程的路由协议命令 |
|
排除 IP 地址目标使用 TE 隧道 |
|
指定策略的参数值 |
|
策略名称 |
|
保留一个或多个带有隧道下一跳的 IPv4 下一跳 选项
|
|
启用 LDP 同步诱导的度量传播 选项
|
|
将多播完整路径发布到 RIB 选项
|
|
系统的流量工程稳定 IP 地址 |
|
启用/禁用 DBD 数据包中忽略 MTU 选项
|
|
网络类型 |
|
指定 OSPFv2 广播多路访问网络 选项
|
|
指定 OSPFv2 NBMA 网络 选项
|
|
指定 OSPFv2 点到多点网络 选项
|
|
指定 OSPFv2 点到点网络 选项
|
|
不间断转发 |
|
思科不间断转发 |
|
当检测到整个 OSPFv2 进程的非 NSF 感知邻居时,取消 NSF 重新启动 选项
|
|
启用思科 NSF 选项
|
|
外部路由学习允许的最大时间 |
|
IETF 平滑重启 |
|
禁用路由器的辅助支持级别 选项
|
|
仅启用 ietf 选项 选项
|
|
NSF 重新启动之间的最小间隔(<90-3600> 秒) |
|
重新启动后路由的最长生命周期(<90-1800> 秒) |
|
为此进程中的所有 VRF 启用 NSR。“False”选项禁用此进程中的所有 VRF 的 NSR 选项
|
|
要使用的 OSPFv2 数据包大小。最小 = 576 最大 = MTU 字节 |
|
启用/禁用被动 选项
|
|
禁止通告前缀 |
|
启用/禁用辅助地址抑制 选项
|
|
设置抑制选项 选项
|
|
路由器优先级 |
|
OSPFv2 进程 ID |
|
协议特定配置 |
|
仅允许发往此框的流量(思科支持) 选项
|
|
传入优先级事件的高水位线 |
|
当传入事件队列超出此值时,将删除 Hello 事件 |
|
当传入事件队列超出此值时,将删除 DBD/LS 更新/请求数据包 |
|
当传入事件队列超出此值时,将删除 LSA ACK |
|
仅在重新加载后关闭 选项
|
|
关闭 OSPFv2 协议 选项
|
|
从另一个路由协议重新分发信息 |
|
应用程序路由的 OnePK 应用程序名称(或)bgp 和 eigrp 的 AS 号(或)isis 和 ospf 的实例名称 |
|
ISIS 级别 选项
|
|
重新分发路由的 LSA 类型 3 选项
|
|
路由重新分发。对于 OSPFv2 - 外部/内部/nssa-外部 1/2。对于 EIGRP - 外部/内部 |
|
重新分发路由的度量值 |
|
重新分发路由的 OSPFv2 外部度量类型 选项
|
|
仅重新分发到 NSSA 区域 选项
|
|
保留 BGP 路由的 med 选项
|
|
将路由策略应用于重新分发 |
|
策略名称 |
|
指定策略的参数值 |
|
要重新分发的路由类型 选项
|
|
设置重新分发到 OSPFv2 中的路由的标记 |
|
LSA 重传之间的延迟 |
|
IPv4 地址格式的 OSPFv2 路由器 ID (A.B.C.D) |
|
启用安全性 |
|
允许的最大 IP 跳数 <1-254> |
|
启用 TTL 安全性 选项
|
|
启用/禁用通告外部前缀作为区域间 选项
|
|
配置 IP 地址摘要 |
|
禁止与指定前缀/掩码对匹配的路由 选项
|
|
IP 摘要地址/掩码 (A.B.C.D/prefix) |
|
设置标记 |
|
配置与计时器相关的常量 |
|
平滑关闭的计时器(思科支持) |
|
开始平滑关闭之前的延迟 |
|
在平滑关闭后保持路由活动的时间 |
|
OSPFv2 全局 LSA 计时器 |
|
OSPFv2 LSA 组步调计时器。刷新或老化一组 LSA 之间的时间间隔 |
|
OSPFv2 MinLSArrival 计时器。接受同一 LSA 之间的最小间隔(以毫秒为单位) |
|
OSPFv2 LSA 刷新间隔。自身始发的 LSA 应刷新的频率,以秒为单位 |
|
OSPFv2 泛洪步调计时器。在所有接口上控制泛洪的间隔,以毫秒为单位 |
|
OSPFv2 限制计时器 |
|
快速重路由限制计时器。以毫秒为单位的 SPF 结束和快速重路由计算开始之间的延迟 |
|
所有类型的 OSPFv2 LSA 的 LSA 限制计时器 |
|
以毫秒为单位生成 LSA 第一次出现的延迟 |
|
以毫秒为单位始发同一 LSA 之间的最大延迟 |
|
以毫秒为单位始发同一 LSA 之间的最小延迟 |
|
OSPFv2 SPF 限制计时器 |
|
以毫秒为单位接收到 SPF 计算更改之间的延迟 |
|
以毫秒为单位的 SPF 计算的最大等待时间 |
|
以毫秒为单位的第一和第二次 SPF 计算之间的延迟 |
|
发送链路状态更新数据包所需的估计时间 |
|
接口权重 |
|
此选项仅与状态 parsed 一起使用。 此选项的值应是通过执行命令 show running-config router ospf 从 IOS-XR 设备收到的输出。 状态 parsed 从 |
|
配置应保留的状态。 选项
|
备注
注意
此模块与连接
network_cli
配合使用。请参阅 IOS-XR 平台选项
示例
# Using merged
# Before state:
# -------------
#
# RP/0/RP0/CPU0:anton#show running-config router ospf
# Thu Jun 11 15:54:44.569 UTC
# % No such configuration item(s)
#
- name: Merge provided OSPFv2 configuration with the existing configuration
cisco.iosxr.iosxr_ospfv2:
config:
processes:
- process_id: '27'
areas:
- area_id: '10'
hello_interval: 2
authentication:
keychain: ansi11393
- process_id: '26'
adjacency_stagger:
max_adjacency: 20
min_adjacency: 10
- process_id: '10'
authentication:
keychain: ansible_test1102
areas:
- area_id: '11'
default_cost: 5
cost: 11
- area_id: 22
default_cost: 6
- process_id: '30'
areas:
- area_id: 11
default_cost: 5
- area_id: 22
default_cost: 6
cost: 2
default_metric: 10
transmit_delay: 2
hello_interval: 1
dead_interval: 2
retransmit_interval: 2
weight: 2
packet_size: 577
priority: 1
router_id: 2.2.2.2
demand_circuit: enable
passive: disable
summary_in: enable
flood_reduction: disable
mtu_ignore: enable
external_out: disable
state: merged
# Task Output:
# ------------
#
# before: {}
#
# commands:
# - router ospf 30
# - cost 2
# - weight 2
# - passive disable
# - priority 1
# - flood-reduction disable
# - default-metric 10
# - router-id 2.2.2.2
# - demand-circuit enable
# - packet-size 577
# - transmit-delay 2
# - summary-in enable
# - external-out disable
# - dead-interval 2
# - hello-interval 1
# - retransmit-interval 2
# - mtu-ignore enable
# - area 11 default-cost 5
# - area 22 default-cost 6
# - router ospf 26
# - adjacency stagger 10 20
# - router ospf 10
# - authentication keychain ansible_test1102
# - area 11 default-cost 5
# - area 11 cost 11
# - area 22 default-cost 6
# - router ospf 27
# - area 10 authentication keychain ansi11393
# - area 10 hello-interval 2
#
# after:
# processes:
# - areas:
# - area_id: '11'
# cost: 11
# default_cost: 5
# - area_id: '22'
# default_cost: 6
# authentication:
# keychain: ansible_test1102
# process_id: '10'
# - adjacency_stagger:
# max_adjacency: 20
# min_adjacency: 10
# process_id: '26'
# - areas:
# - area_id: '10'
# authentication:
# keychain: ansi11393
# hello_interval: 2
# process_id: '27'
# - areas:
# - area_id: '11'
# default_cost: 5
# - area_id: '22'
# default_cost: 6
# cost: 2
# dead_interval: 2
# default_metric: 10
# demand_circuit: enable
# external_out: disable
# flood_reduction: disable
# hello_interval: 1
# mtu_ignore: enable
# packet_size: 577
# passive: disable
# priority: 1
# process_id: '30'
# retransmit_interval: 2
# router_id: 2.2.2.2
# summary_in: enable
# transmit_delay: 2
# weight: 2
#
# After state:
# ------------
#
# router ospf 10
# authentication keychain ansible_test1102
# area 11
# cost 11
# default-cost 5
# !
# area 22
# default-cost 6
# !
# !
# router ospf 26
# adjacency stagger 10 20
# !
# router ospf 27
# area 10
# authentication keychain ansi11393
# hello-interval 2
# !
# !
# router ospf 30
# router-id 2.2.2.2
# summary-in enable
# external-out disable
# cost 2
# packet-size 577
# weight 2
# passive disable
# priority 1
# mtu-ignore enable
# flood-reduction disable
# dead-interval 2
# retransmit-interval 2
# demand-circuit enable
# hello-interval 1
# transmit-delay 2
# default-metric 10
# area 11
# default-cost 5
# !
# area 22
# default-cost 6
# !
# !
# Using replaced
#
# Before state:
# -------------
#
#
# RP/0/RP0/CPU0:anton#show running-config router ospf
# Thu Jun 11 16:06:44.406 UTC
# router ospf 10
# authentication keychain ansible_test1102
# area 11
# cost 11
# default-cost 5
# !
# area 22
# default-cost 6
# !
# !
# router ospf 26
# adjacency stagger 10 20
# !
# router ospf 27
# area 10
# authentication keychain ansi11393
# hello-interval 2
# !
# !
# router ospf 30
# router-id 2.2.2.2
# summary-in enable
# external-out disable
# cost 2
# packet-size 577
# weight 2
# passive disable
# priority 1
# mtu-ignore enable
# flood-reduction disable
# dead-interval 2
# retransmit-interval 2
# demand-circuit enable
# hello-interval 1
# transmit-delay 2
# default-metric 10
# area 11
# default-cost 5
# !
# area 22
# default-cost 6
# !
# !
#
- name: Replace running OSPFv2 routes configurations with provided config.
cisco.iosxr.iosxr_ospfv2:
config:
processes:
- process_id: 27
areas:
- area_id: 10
hello_interval: 2
- area_id: 20
cost: 2
default_cost: 2
authentication:
keychain: ansi11393
- process_id: 26
adjacency_stagger:
min_adjacency: 10
max_adjacency: 20
state: replaced
# Task Output:
# ------------
#
# before:
# processes:
# - areas:
# - area_id: '11'
# cost: 11
# default_cost: 5
# - area_id: '22'
# default_cost: 6
# authentication:
# keychain: ansible_test1102
# process_id: '10'
# - adjacency_stagger:
# max_adjacency: 20
# min_adjacency: 10
# process_id: '26'
# - areas:
# - area_id: '10'
# authentication:
# keychain: ansi11393
# hello_interval: 2
# process_id: '27'
# - areas:
# - area_id: '11'
# default_cost: 5
# - area_id: '22'
# default_cost: 6
# cost: 2
# dead_interval: 2
# default_metric: 10
# demand_circuit: enable
# external_out: disable
# flood_reduction: disable
# hello_interval: 1
# mtu_ignore: enable
# packet_size: 577
# passive: disable
# priority: 1
# process_id: '30'
# retransmit_interval: 2
# router_id: 2.2.2.2
# summary_in: enable
# transmit_delay: 2
# weight: 2
#
# commands:
# - router ospf 27
# - no area 10 authentication keychain ansi11393
# - area 20 authentication keychain ansi11393
# - area 20 default-cost 2
# - area 20 cost 2
#
# after:
# processes:
# - areas:
# - area_id: '11'
# cost: 11
# default_cost: 5
# - area_id: '22'
# default_cost: 6
# authentication:
# keychain: ansible_test1102
# process_id: '10'
# - adjacency_stagger:
# max_adjacency: 20
# min_adjacency: 10
# process_id: '26'
# - areas:
# - area_id: '10'
# hello_interval: 2
# - area_id: '20'
# authentication:
# keychain: ansi11393
# cost: 2
# default_cost: 2
# process_id: '27'
# - areas:
# - area_id: '11'
# default_cost: 5
# - area_id: '22'
# default_cost: 6
# cost: 2
# dead_interval: 2
# default_metric: 10
# demand_circuit: enable
# external_out: disable
# flood_reduction: disable
# hello_interval: 1
# mtu_ignore: enable
# packet_size: 577
# passive: disable
# priority: 1
# process_id: '30'
# retransmit_interval: 2
# router_id: 2.2.2.2
# summary_in: enable
# transmit_delay: 2
# weight: 2
#
# After state:
# ------------
#
# RP/0/RP0/CPU0:anton(config)#do show running-config router ospf
# Thu Jun 11 16:40:31.038 UTC
# router ospf 10
# authentication keychain ansible_test1102
# area 11
# cost 11
# default-cost 5
# !
# area 22
# default-cost 6
# !
# !
# router ospf 26
# adjacency stagger 10 20
# !
# router ospf 27
# area 10
# hello-interval 2
# !
# area 20
# cost 2
# authentication keychain ansi11393
# default-cost 2
# !
# !
# router ospf 30
# router-id 2.2.2.2
# summary-in enable
# external-out disable
# cost 2
# packet-size 577
# weight 2
# passive disable
# priority 1
# mtu-ignore enable
# flood-reduction disable
# dead-interval 2
# retransmit-interval 2
# demand-circuit enable
# hello-interval 1
# transmit-delay 2
# default-metric 10
# area 11
# default-cost 5
# !
# area 22
# default-cost 6
# !
# !
# Using overridden
#
# Before state:
# -------------
#
# RP/0/RP0/CPU0:anton#show running-config router ospf
# Thu Jun 11 16:06:44.406 UTC
# router ospf 10
# authentication keychain ansible_test1102
# area 11
# cost 11
# default-cost 5
# !
# area 22
# default-cost 6
# !
# !
# router ospf 26
# adjacency stagger 10 20
# !
# router ospf 27
# area 10
# hello-interval 2
# !
# area 20
# cost 2
# authentication keychain ansi11393
# default-cost 2
# !
# !
# router ospf 30
# router-id 2.2.2.2
# summary-in enable
# external-out disable
# cost 2
# packet-size 577
# weight 2
# passive disable
# priority 1
# mtu-ignore enable
# flood-reduction disable
# dead-interval 2
# retransmit-interval 2
# demand-circuit enable
# hello-interval 1
# transmit-delay 2
# default-metric 10
# area 11
# default-cost 5
# !
# area 22
# default-cost 6
# !
# !
- name: Override existing OSPFv2 configurations with provided config.
cisco.iosxr.iosxr_ospfv2:
config:
processes:
- process_id: 27
areas:
- area_id: 10
hello_interval: 2
authentication:
keychain: ansi11393
- area_id: 20
cost: 2
default_cost: 2
authentication:
keychain: ansi11393
- process_id: 26
adjacency_stagger:
min_adjacency: 10
max_adjacency: 20
state: overridden
#
# Task Output:
# ------------
#
# before:
# processes:
# - areas:
# - area_id: '11'
# cost: 11
# default_cost: 5
# - area_id: '22'
# default_cost: 6
# authentication:
# keychain: ansible_test1102
# process_id: '10'
# - adjacency_stagger:
# max_adjacency: 20
# min_adjacency: 10
# process_id: '26'
# - areas:
# - area_id: '10'
# hello_interval: 2
# - area_id: '20'
# authentication:
# keychain: ansi11393
# cost: 2
# default_cost: 2
# process_id: '27'
# - areas:
# - area_id: '11'
# default_cost: 5
# - area_id: '22'
# default_cost: 6
# cost: 2
# dead_interval: 2
# default_metric: 10
# demand_circuit: enable
# external_out: disable
# flood_reduction: disable
# hello_interval: 1
# mtu_ignore: enable
# packet_size: 577
# passive: disable
# priority: 1
# process_id: '30'
# retransmit_interval: 2
# router_id: 2.2.2.2
# summary_in: enable
# transmit_delay: 2
# weight: 2
#
# commands:
# - router ospf 10
# - no authentication keychain ansible_test1102
# - no area 11 default-cost 5
# - no area 11 cost 11
# - no area 22 default-cost 6
# - router ospf 30
# - no cost 2
# - no weight 2
# - no passive disable
# - no priority 1
# - no flood-reduction disable
# - no default-metric 10
# - no router-id 2.2.2.2
# - no demand-circuit enable
# - no packet-size 577
# - no transmit-delay 2
# - no summary-in enable
# - no external-out disable
# - no dead-interval 2
# - no hello-interval 1
# - no retransmit-interval 2
# - no mtu-ignore enable
# - no area 11 default-cost 5
# - no area 22 default-cost 6
# - router ospf 27
# - area 10 authentication keychain ansi11393
#
# after:
# processes:
# - process_id: '10'
# - adjacency_stagger:
# max_adjacency: 20
# min_adjacency: 10
# process_id: '26'
# - areas:
# - area_id: '10'
# authentication:
# keychain: ansi11393
# hello_interval: 2
# - area_id: '20'
# authentication:
# keychain: ansi11393
# cost: 2
# default_cost: 2
# process_id: '27'
# - process_id: '30'
#
# After state:
# ------------
#
# RP/0/RP0/CPU0:anton#show running-config router ospf
# Thu Jun 11 16:50:36.332 UTC
# router ospf 10
# area 11
# !
# area 22
# !
# !
# router ospf 26
# adjacency stagger 10 20
# !
# router ospf 27
# area 10
# authentication keychain ansi11393
# hello-interval 2
# !
# area 20
# cost 2
# authentication keychain ansi11393
# default-cost 2
# !
# !
# router ospf 30
# area 11
# !
# area 22
# !
# !
#
# Using deleted
#
# Before state:
# -------------
#
# RP/0/RP0/CPU0:anton#show running-config router ospf
# Thu Jun 11 16:06:44.406 UTC
# router ospf 10
# authentication keychain ansible_test1102
# area 11
# cost 11
# default-cost 5
# !
# area 22
# default-cost 6
# !
# !
# router ospf 26
# adjacency stagger 10 20
# !
# router ospf 27
# area 10
# authentication keychain ansi11393
# hello-interval 2
# !
# area 20
# cost 2
# authentication keychain ansi11393
# default-cost 2
# !
# !
# router ospf 30
# router-id 2.2.2.2
# summary-in enable
# external-out disable
# cost 2
# packet-size 577
# weight 2
# passive disable
# priority 1
# mtu-ignore enable
# flood-reduction disable
# dead-interval 2
# retransmit-interval 2
# demand-circuit enable
# hello-interval 1
# transmit-delay 2
# default-metric 10
# area 11
# default-cost 5
# !
# area 22
# default-cost 6
# !
# !
- name: Deleted provided ospfv2 processes.
cisco.iosxr.iosxr_ospfv2:
config:
processes:
- process_id: '10'
- process_id: '26'
- process_id: '27'
- process_id: '30'
state: deleted
#
# Task Output:
# ------------
#
# before:
# processes:
# - areas:
# - area_id: '11'
# cost: 11
# default_cost: 5
# - area_id: '22'
# default_cost: 6
# authentication:
# keychain: ansible_test1102
# process_id: '10'
# - adjacency_stagger:
# max_adjacency: 20
# min_adjacency: 10
# process_id: '26'
# - areas:
# - area_id: '10'
# authentication:
# keychain: ansi11393
# hello_interval: 2
# - area_id: '20'
# authentication:
# keychain: ansi11393
# cost: 2
# default_cost: 2
# process_id: '27'
# - areas:
# - area_id: '11'
# default_cost: 5
# - area_id: '22'
# default_cost: 6
# cost: 2
# dead_interval: 2
# default_metric: 10
# demand_circuit: enable
# external_out: disable
# flood_reduction: disable
# hello_interval: 1
# mtu_ignore: enable
# packet_size: 577
# passive: disable
# priority: 1
# process_id: '30'
# retransmit_interval: 2
# router_id: 2.2.2.2
# summary_in: enable
# transmit_delay: 2
# weight: 2
#
# commands:
# - router ospf 10
# - no authentication keychain ansible_test1102
# - no area 11 default-cost 5
# - no area 11 cost 11
# - no area 22 default-cost 6
# - router ospf 26
# - no adjacency stagger 10 20
# - router ospf 27
# - no area 10 authentication keychain ansi11393
# - no area 10 hello-interval 2
# - no area 20 authentication keychain ansi11393
# - no area 20 default-cost 2
# - no area 20 cost 2
# - router ospf 30
# - no cost 2
# - no weight 2
# - no passive disable
# - no priority 1
# - no flood-reduction disable
# - no default-metric 10
# - no router-id 2.2.2.2
# - no demand-circuit enable
# - no packet-size 577
# - no transmit-delay 2
# - no summary-in enable
# - no external-out disable
# - no dead-interval 2
# - no hello-interval 1
# - no retransmit-interval 2
# - no mtu-ignore enable
# - no area 11 default-cost 5
# - no area 22 default-cost 6
#
# after:
# processes:
# - process_id: '10'
# - process_id: '26'
# - process_id: '27'
# - process_id: '30'
# After state:
# ------------
#
# RP/0/RP0/CPU0:anton(config)#show running-config router ospf
# Thu Jun 11 17:07:34.218 UTC
# router ospf 10
# area 11
# !
# area 22
# !
# !
# router ospf 26
# !
# router ospf 27
# area 10
# !
# area 20
# !
# !
# router ospf 30
# area 11
# !
# area 22
# !
# !
# Using parsed
# parsed.cfg
# ------------
# Thu Jun 11 17:28:51.918 UTC
# router ospf 10
# authentication keychain ansible_test1102
# area 11
# cost 11
# default-cost 5
# !
# area 22
# default-cost 6
# !
# !
# router ospf 26
# authentication message-digest keychain ansible1101pass
# adjacency stagger 10 20
# !
# router ospf 27
# area 10
# authentication keychain ansi11393
# hello-interval 2
# !
# !
# router ospf 30
# router-id 2.2.2.2
# summary-in enable
# external-out disable
# cost 2
# packet-size 577
# weight 2
# passive disable
# priority 1
# mtu-ignore enable
# flood-reduction disable
# dead-interval 2
# retransmit-interval 2
# demand-circuit enable
# hello-interval 1
# transmit-delay 2
# default-metric 10
# area 11
# default-cost 5
# !
# area 22
# default-cost 6
# !
# !
#
- name: Parsed the device configuration to get output commands
cisco.iosxr.iosxr_ospfv2:
running_config: "{{ lookup('file', './parsed.cfg') }}"
state: parsed
#
# Task Output:
# ------------
#
# parsed:
# processes:
# - areas:
# - area_id: '11'
# cost: 11
# default_cost: 5
# - area_id: '22'
# default_cost: 6
# authentication:
# keychain: ansible_test1102
# process_id: '10'
# - adjacency_stagger:
# max_adjacency: 20
# min_adjacency: 10
# authentication:
# message_digest:
# keychain: ansible1101pass
# process_id: '26'
# - areas:
# - area_id: '10'
# authentication:
# keychain: ansi11393
# hello_interval: 2
# process_id: '27'
# - areas:
# - area_id: '11'
# default_cost: 5
# - area_id: '22'
# default_cost: 6
# cost: 2
# dead_interval: 2
# default_metric: 10
# demand_circuit: enable
# external_out: disable
# flood_reduction: disable
# hello_interval: 1
# mtu_ignore: enable
# packet_size: 577
# passive: disable
# priority: 1
# process_id: '30'
# retransmit_interval: 2
# router_id: 2.2.2.2
# summary_in: enable
# transmit_delay: 2
# weight: 2
# Using rendered
#
- name: Render the commands for provided configuration
cisco.iosxr.iosxr_ospfv2:
config:
processes:
- process_id: 27
areas:
- area_id: 10
hello_interval: 2
authentication:
keychain: ansi11393
- process_id: 26
adjacency_stagger:
min_adjacency: 10
max_adjacency: 20
- process_id: 10
authentication:
keychain: ansible_test1102
areas:
- area_id: 11
default_cost: 5
cost: 11
- area_id: 22
default_cost: 6
- process_id: 30
areas:
- area_id: 11
default_cost: 5
- area_id: 22
default_cost: 6
cost: 2
default_metric: 10
transmit_delay: 2
hello_interval: 1
dead_interval: 2
retransmit_interval: 2
weight: 2
packet_size: 577
priority: 1
router_id: 2.2.2.2
demand_circuit: enable
passive: disable
summary_in: enable
flood_reduction: disable
mtu_ignore: enable
external_out: disable
state: rendered
#
# Task Output:
# ------------
#
# rendered:
# - router ospf 27
# - area 10 authentication keychain ansi11393
# - area 10 hello-interval 2
# - router ospf 26
# - adjacency stagger 10 20
# - router ospf 10
# - authentication keychain ansible_test1102
# - area 11 default-cost 5
# - area 11 cost 11
# - area 22 default-cost 6
# - router ospf 30
# - cost 2
# - weight 2
# - passive disable
# - priority 1
# - flood-reduction disable
# - default-metric 10
# - router-id 2.2.2.2
# - demand-circuit enable
# - packet-size 577
# - transmit-delay 2
# - summary-in enable
# - external-out disable
# - dead-interval 2
# - hello-interval 1
# - retransmit-interval 2
# - mtu-ignore enable
# - area 11 default-cost 5
# - area 22 default-cost 6
# Using gathered
#
# Before state:
# -------------
#
# RP/0/RP0/CPU0:anton#show running-config router ospf
# Thu Jun 11 16:06:44.406 UTC
# router ospf 10
# authentication keychain ansible_test1102
# area 11
# cost 11
# default-cost 5
# !
# area 22
# default-cost 6
# !
# !
# router ospf 26
# adjacency stagger 10 20
# !
# router ospf 27
# area 10
# authentication keychain ansi11393
# hello-interval 2
# !
# area 20
# !
# !
# router ospf 30
# router-id 2.2.2.2
# summary-in enable
# external-out disable
# cost 2
# packet-size 577
# weight 2
# passive disable
# priority 1
# mtu-ignore enable
# flood-reduction disable
# dead-interval 2
# retransmit-interval 2
# demand-circuit enable
# hello-interval 1
# transmit-delay 2
# default-metric 10
# area 11
# default-cost 5
# !
# area 22
# default-cost 6
# !
# !
#
- name: Gather ospfv2 routes configuration
cisco.iosxr.iosxr_ospfv2:
state: gathered
#
#
# Task Output:
# ------------
#
# gathered:
# processes:
# - areas:
# - area_id: '11'
# cost: 11
# default_cost: 5
# - area_id: '22'
# default_cost: 6
# authentication:
# keychain: ansible_test1102
# process_id: '10'
# - adjacency_stagger:
# max_adjacency: 20
# min_adjacency: 10
# process_id: '26'
# - areas:
# - area_id: '10'
# authentication:
# keychain: ansi11393
# hello_interval: 2
# process_id: '27'
# - areas:
# - area_id: '11'
# default_cost: 5
# - area_id: '22'
# default_cost: 6
# cost: 2
# dead_interval: 2
# default_metric: 10
# demand_circuit: enable
# external_out: disable
# flood_reduction: disable
# hello_interval: 1
# mtu_ignore: enable
# packet_size: 577
# passive: disable
# priority: 1
# process_id: '30'
# retransmit_interval: 2
# router_id: 2.2.2.2
# summary_in: enable
# transmit_delay: 2
# weight: 2
#
# After state:
# -------------
#
# RP/0/RP0/CPU0:anton#show running-config router ospf
# Thu Jun 11 16:06:44.406 UTC
# router ospf 10
# authentication keychain ansible_test1102
# area 11
# cost 11
# default-cost 5
# !
# area 22
# default-cost 6
# !
# !
# router ospf 26
# authentication message-digest keychain ansible1101pass
# adjacency stagger 10 20
# !
# router ospf 27
# area 10
# authentication keychain ansi11393
# hello-interval 2
# !
# !
# router ospf 30
# router-id 2.2.2.2
# summary-in enable
# external-out disable
# cost 2
# packet-size 577
# weight 2
# passive disable
# priority 1
# mtu-ignore enable
# flood-reduction disable
# dead-interval 2
# retransmit-interval 2
# demand-circuit enable
# hello-interval 1
# transmit-delay 2
# default-metric 10
# area 11
# default-cost 5
# !
# area 22
# default-cost 6
# !
# !
#
返回值
通用返回值记录在此处,以下是此模块特有的字段
键 |
描述 |
---|---|
生成的配置模型调用。 返回:当更改时 示例: |
|
模型调用之前的配置。 返回: 始终 示例: |
|
推送到远程设备的命令集。 返回: 始终 示例: |
|
从远程设备收集的关于网络资源的结构化数据的事实。 返回: 当 state 为 示例: |
|
按照模块参数规范,将 running_config 选项中提供的设备原生配置解析为结构化数据。 返回: 当 state 为 示例: |
|
任务中提供的配置以设备原生格式渲染(离线)。 返回: 当 state 为 示例: |