cisco.ios.ios_ospf_interfaces 模块 – 用于配置 OSPF 接口的资源模块。
注意
此模块是 cisco.ios 集合(版本 9.0.3)的一部分。
如果您正在使用 ansible
包,您可能已经安装了这个集合。它不包含在 ansible-core
中。要检查是否已安装,请运行 ansible-galaxy collection list
。
要安装它,请使用:ansible-galaxy collection install cisco.ios
。
要在 playbook 中使用它,请指定:cisco.ios.ios_ospf_interfaces
。
cisco.ios 1.0.0 中的新增功能
概要
此模块在 IOS 平台上配置和管理开放最短路径优先(OSPF)版本 2。
参数
参数 |
注释 |
---|---|
OSPF 接口选项的字典。 |
|
在地址族上下文中接口上的 OSPF 接口设置。 |
|
邻接错开 选项
|
|
接口上 OSPF 接口设置的地址族标识符 (AFI)。 选项
|
|
启用身份验证 |
|
使用密钥链进行加密身份验证密钥 |
|
使用消息摘要身份验证 选项
|
|
不使用身份验证 选项
|
|
BFD 配置命令 在此接口上启用/禁用 BFD 选项
|
|
接口成本 |
|
指定动态成本选项 仅对 IPv6 OSPF 配置有效 |
|
指定默认链路度量值 |
|
为 LSA 抑制指定迟滞值 |
|
指定迟滞百分比变化。请参阅供应商文档了解有效值。 |
|
指定迟滞阈值。请参阅供应商文档了解有效值。 |
|
指定应用于各个度量的权重 |
|
指定给予 L2 因子度量的权重 L2 因子度量的百分比权重。请参阅供应商文档了解有效值。 |
|
指定给予延迟度量的权重。 延迟度量的百分比权重。请参阅供应商文档了解有效值。 |
|
指定给予 oc 的 cdr/mdr 的权重 为当前数据速率提供 100% 的权重(最大数据速率为 0) 选项
|
|
指定给予资源度量的权重 资源度量的百分比权重。请参阅供应商文档了解有效值。 |
|
指定给予吞吐量度量的权重 吞吐量度量的百分比权重。请参阅供应商文档了解有效值。 |
|
此接口的接口成本或路由成本 |
|
在同步和泛洪期间过滤 OSPF LSA 选项
|
|
邻居被声明为死亡后经过的时间间隔 |
|
设置为 1 秒并为 Hello 设置乘数 在 1 秒内发送的 Hello 数量。请参阅供应商文档了解有效值。 仅对 IP OSPF 配置有效 |
|
以秒为单位的时间 |
|
OSPF 按需电路,启用或禁用按需电路’ |
|
禁用此接口上的按需电路 仅对 IPv6 OSPF 配置有效 选项
|
|
启用按需电路 选项
|
|
忽略按需电路自动协商请求 选项
|
|
OSPF 泛洪减少 选项
|
|
HELLO 数据包之间的时间 请参阅供应商文档了解有效值。 |
|
链路本地信令 (LLS) 支持 仅对 IP OSPF 配置有效 选项
|
|
移动自组织网络选项 MANET 对等选项 仅对 IPv6 OSPF 配置有效 |
|
对等所需冗余路径成本改进 |
|
相对增量路径成本。请参阅供应商文档了解有效值。 |
|
绝对增量路径成本。请参阅供应商文档了解有效值。 |
|
对等所需冗余路径成本改进 |
|
最小链路成本阈值。请参阅供应商文档了解有效值。 |
|
启用链路度量 选项
|
|
忽略 DBD 数据包中的 MTU 选项
|
|
设置 OSPF 多区域 ID 仅对 IP OSPF 配置有效 |
|
接口成本 |
|
OSPF 多区域 ID(十进制值)。请参阅供应商文档了解有效值。 OSPF 多区域 ID(IP 地址格式,例如 A.B.C.D) |
|
OSPF 邻居链路本地 IPv6 地址 (X:X:X:X::X) 仅对 IPv6 OSPF 配置有效 |
|
邻居链路本地 IPv6 地址 |
|
点对多点邻居的 OSPF 成本 |
|
在同步和泛洪期间过滤点对多点邻居的 OSPF LSA 选项
|
|
OSPF 死路由器轮询间隔 |
|
非广播邻居的 OSPF 优先级 |
|
网络类型 |
|
指定 OSPF 广播多路访问网络 选项
|
|
指定 MANET OSPF 接口类型 仅对 IPv6 OSPF 配置有效 选项
|
|
指定 OSPF NBMA 网络 选项
|
|
指定 OSPF 点对多点网络 选项
|
|
指定 OSPF 点对点网络 选项
|
|
启用/禁用 OSPF 前缀抑制 选项
|
|
路由器优先级。请参阅供应商文档了解有效值。 |
|
OSPF 接口配置 |
|
OSPF 接口区域 ID,以十进制数值表示。请参考供应商文档以获取有效值。 OSPF 接口区域 ID,以 IP 地址格式表示(例如,A.B.C.D)。 |
|
接口上 OSPF 接口设置的地址族标识符 (AFI)。请参考供应商文档以获取有效值。 |
|
根据 ID 设置 OSPF 实例。 仅对 IPv6 OSPF 配置有效 |
|
包含或排除辅助 IP 地址。 仅在 IPv4 配置中有效。 选项
|
|
如果未启动 oob-resync,则重置邻接关系的间隔。请参考供应商文档以获取有效值。 |
|
重新传输丢失的链路状态通告的时间间隔。请参考供应商文档以获取有效值。 |
|
将当前接口下的 OSPF 协议状态设置为禁用。 选项
|
|
链路状态传输延迟。请参考供应商文档以获取有效值。 |
|
TTL 安全检查。 仅在 IPV4 OSPF 配置中有效。 |
|
允许的最大 IP 跳数。 请参阅供应商文档了解有效值。 |
|
在所有接口上启用 TTL 安全。 选项
|
|
接口的全名,不包括任何逻辑单元号,例如 GigabitEthernet0/1。 |
|
此选项仅在状态为 parsed 时使用。 此选项的值应为通过执行命令 sh running-config | section ^interface 从 IOS 设备接收到的输出。 状态 parsed 从 |
|
配置应保留的状态。 状态 rendered、gathered 和 parsed 不会对设备执行任何更改。 状态 rendered 会将 状态 gathered 将从设备获取运行配置,并按照资源模块 argspec 的格式将其转换为结构化数据,该值将在结果中的 gathered 键中返回。 状态 parsed 从 选项
|
注释
注意
已在 CML 上的 Cisco IOSXE 17.3 版本上测试。
此模块与连接
network_cli
配合使用。请参阅 https://docs.ansible.org.cn/ansible/latest/network/user_guide/platform_ios.html
示例
# Using deleted
# Before state:
# -------------
#
# router-ios#sh running-config | section ^interface
# interface GigabitEthernet0/0
# interface GigabitEthernet0/1
# ipv6 ospf 55 area 105
# ipv6 ospf priority 20
# ipv6 ospf transmit-delay 30
# ipv6 ospf adjacency stagger disable
# interface GigabitEthernet0/2
# ip ospf priority 40
# ip ospf adjacency stagger disable
# ip ospf ttl-security hops 50
# ip ospf 10 area 20
# ip ospf cost 30
- name: Delete provided OSPF Interface config
cisco.ios.ios_ospf_interfaces:
config:
- name: GigabitEthernet0/1
state: deleted
# Task Output:
# ------------
# before:
# - name: GigabitEthernet0/0
# - address_family:
# - adjacency: true
# afi: ipv6
# priority: 20
# process:
# area_id: '105'
# id: 55
# transmit_delay: 30
# name: GigabitEthernet0/1
# - address_family:
# - adjacency: true
# afi: ipv4
# cost:
# interface_cost: 30
# priority: 40
# process:
# area_id: '20'
# id: 10
# ttl_security:
# hops: 50
# set: true
# name: GigabitEthernet0/2
#
# commands:
# - interface GigabitEthernet0/1
# - no ipv6 ospf 55 area 105
# - no ipv6 ospf adjacency stagger disable
# - no ipv6 ospf priority 20
# - no ipv6 ospf transmit-delay 30
#
# after:
# - name: GigabitEthernet0/0
# - name: GigabitEthernet0/1
# - address_family:
# - adjacency: true
# afi: ipv4
# cost:
# interface_cost: 30
# priority: 40
# process:
# area_id: '20'
# id: 10
# ttl_security:
# hops: 50
# set: true
# name: GigabitEthernet0/2
#
# After state:
# ------------
# router-ios#sh running-config | section ^interface
# interface GigabitEthernet0/0
# interface GigabitEthernet0/1
# interface GigabitEthernet0/2
# ip ospf priority 40
# ip ospf adjacency stagger disable
# ip ospf ttl-security hops 50
# ip ospf 10 area 20
# ip ospf cost 30
# Using deleted without any config passed (NOTE: This will delete all OSPF Interfaces configuration from device)
# Before state:
# -------------
#
# router-ios#sh running-config | section ^interface
# interface GigabitEthernet0/0
# interface GigabitEthernet0/1
# ipv6 ospf 55 area 105
# ipv6 ospf priority 20
# ipv6 ospf transmit-delay 30
# ipv6 ospf adjacency stagger disable
# interface GigabitEthernet0/2
# ip ospf priority 40
# ip ospf adjacency stagger disable
# ip ospf ttl-security hops 50
# ip ospf 10 area 20
# ip ospf cost 30
- name: Delete all OSPF config from interfaces
cisco.ios.ios_ospf_interfaces:
state: deleted
# Task Output:
# ------------
# before:
# - name: GigabitEthernet0/0
# - address_family:
# - adjacency: true
# afi: ipv6
# priority: 20
# process:
# area_id: '105'
# id: 55
# transmit_delay: 30
# name: GigabitEthernet0/1
# - address_family:
# - adjacency: true
# afi: ipv4
# cost:
# interface_cost: 30
# priority: 40
# process:
# area_id: '20'
# id: 10
# ttl_security:
# hops: 50
# set: true
# name: GigabitEthernet0/2
#
# commands:
# - interface GigabitEthernet0/2
# - no ip ospf 10 area 20
# - no ip ospf adjacency stagger disable
# - no ip ospf cost 30
# - no ip ospf priority 40
# - no ip ospf ttl-security hops 50
# - interface GigabitEthernet0/1
# - no ipv6 ospf 55 area 105
# - no ipv6 ospf adjacency stagger disable
# - no ipv6 ospf priority 20
# - no ipv6 ospf transmit-delay 30
#
# after:
# - name: GigabitEthernet0/0
# - name: GigabitEthernet0/1
# - name: GigabitEthernet0/2
# After state:
# -------------
# router-ios#sh running-config | section ^interface
# interface GigabitEthernet0/0
# interface GigabitEthernet0/1
# interface GigabitEthernet0/2
# Using merged
# Before state:
# -------------
#
# router-ios#sh running-config | section ^interface
# router-ios#
- name: Merge provided OSPF Interfaces configuration
cisco.ios.ios_ospf_interfaces:
config:
- name: GigabitEthernet0/1
address_family:
- afi: ipv4
process:
id: 10
area_id: 30
adjacency: true
bfd: true
cost:
interface_cost: 5
dead_interval:
time: 5
demand_circuit:
ignore: true
network:
broadcast: true
priority: 25
resync_timeout: 10
shutdown: true
ttl_security:
hops: 50
- afi: ipv6
process:
id: 35
area_id: 45
adjacency: true
database_filter: true
manet:
link_metrics:
cost_threshold: 10
priority: 55
transmit_delay: 45
state: merged
# Task Output:
# ------------
# before: []
#
# commands:
# - interface GigabitEthernet0/1
# - ip ospf 10 area 30
# - ip ospf adjacency stagger disable
# - ip ospf bfd
# - ip ospf cost 5
# - ip ospf dead-interval 5
# - ip ospf demand-circuit ignore
# - ip ospf network broadcast
# - ip ospf priority 25
# - ip ospf resync-timeout 10
# - ip ospf shutdown
# - ip ospf ttl-security hops 50
# - ipv6 ospf 35 area 45
# - ipv6 ospf adjacency stagger disable
# - ipv6 ospf database-filter all out
# - ipv6 ospf manet peering link-metrics 10
# - ipv6 ospf priority 55
# - ipv6 ospf transmit-delay 45
#
# after:
# - name: GigabitEthernet0/0
# - address_family:
# - adjacency: true
# afi: ipv4
# bfd: true
# cost:
# interface_cost: 5
# dead_interval:
# time: 5
# demand_circuit:
# enable: true
# ignore: true
# network:
# broadcast: true
# priority: 25
# process:
# area_id: '30'
# id: 10
# resync_timeout: 10
# shutdown: true
# ttl_security:
# hops: 50
# set: true
# - adjacency: true
# afi: ipv6
# database_filter: true
# manet:
# link_metrics:
# cost_threshold: 10
# priority: 55
# process:
# area_id: '45'
# id: 35
# transmit_delay: 45
# name: GigabitEthernet0/1
# - name: GigabitEthernet0/2
# After state:
# -------------
#
# router-ios#sh running-config | section ^interface
# interface GigabitEthernet0/0
# interface GigabitEthernet0/1
# ip ospf network broadcast
# ip ospf resync-timeout 10
# ip ospf dead-interval 5
# ip ospf priority 25
# ip ospf demand-circuit ignore
# ip ospf bfd
# ip ospf adjacency stagger disable
# ip ospf ttl-security hops 50
# ip ospf shutdown
# ip ospf 10 area 30
# ip ospf cost 5
# ipv6 ospf 35 area 45
# ipv6 ospf priority 55
# ipv6 ospf transmit-delay 45
# ipv6 ospf database-filter all out
# ipv6 ospf adjacency stagger disable
# ipv6 ospf manet peering link-metrics 10
# interface GigabitEthernet0/2
# Using overridden
# Before state:
# -------------
#
# router-ios#sh running-config | section ^interface
# interface GigabitEthernet0/0
# interface GigabitEthernet0/1
# ip ospf network broadcast
# ip ospf resync-timeout 10
# ip ospf dead-interval 5
# ip ospf priority 25
# ip ospf demand-circuit ignore
# ip ospf bfd
# ip ospf adjacency stagger disable
# ip ospf ttl-security hops 50
# ip ospf shutdown
# ip ospf 10 area 30
# ip ospf cost 5
# ipv6 ospf 35 area 45
# ipv6 ospf priority 55
# ipv6 ospf transmit-delay 45
# ipv6 ospf database-filter all out
# ipv6 ospf adjacency stagger disable
# ipv6 ospf manet peering link-metrics 10
# interface GigabitEthernet0/2
- name: Override running config with provided OSPF Interfaces configuration
cisco.ios.ios_ospf_interfaces:
config:
- name: GigabitEthernet0/1
address_family:
- afi: ipv6
process:
id: 55
area_id: 105
adjacency: true
priority: 20
transmit_delay: 30
- name: GigabitEthernet0/2
address_family:
- afi: ipv4
process:
id: 10
area_id: 20
adjacency: true
cost:
interface_cost: 30
priority: 40
ttl_security:
hops: 50
state: overridden
# Task Output:
# ------------
#
# before:
# - name: GigabitEthernet0/0
# - address_family:
# - adjacency: true
# afi: ipv4
# bfd: true
# cost:
# interface_cost: 5
# dead_interval:
# time: 5
# demand_circuit:
# enable: true
# ignore: true
# network:
# broadcast: true
# priority: 25
# process:
# area_id: '30'
# id: 10
# resync_timeout: 10
# shutdown: true
# ttl_security:
# hops: 50
# set: true
# - adjacency: true
# afi: ipv6
# database_filter: true
# manet:
# link_metrics:
# cost_threshold: 10
# priority: 55
# process:
# area_id: '45'
# id: 35
# transmit_delay: 45
# name: GigabitEthernet0/1
# - name: GigabitEthernet0/2
#
# commands:
# - interface GigabitEthernet0/2
# - ip ospf 10 area 20
# - ip ospf adjacency stagger disable
# - ip ospf cost 30
# - ip ospf priority 40
# - ip ospf ttl-security hops 50
# - interface GigabitEthernet0/1
# - ipv6 ospf 55 area 105
# - no ipv6 ospf database-filter all out
# - no ipv6 ospf manet peering link-metrics 10
# - ipv6 ospf priority 20
# - ipv6 ospf transmit-delay 30
# - no ip ospf 10 area 30
# - no ip ospf adjacency stagger disable
# - no ip ospf bfd
# - no ip ospf cost 5
# - no ip ospf dead-interval 5
# - no ip ospf demand-circuit ignore
# - no ip ospf network broadcast
# - no ip ospf priority 25
# - no ip ospf resync-timeout 10
# - no ip ospf shutdown
# - no ip ospf ttl-security hops 50
#
# parsed:
# - name: GigabitEthernet0/0
# - address_family:
# - adjacency: true
# afi: ipv6
# priority: 20
# process:
# area_id: '105'
# id: 55
# transmit_delay: 30
# name: GigabitEthernet0/1
# - address_family:
# - adjacency: true
# afi: ipv4
# cost:
# interface_cost: 30
# priority: 40
# process:
# area_id: '20'
# id: 10
# ttl_security:
# hops: 50
# set: true
# name: GigabitEthernet0/2
#
# After state:
# -------------
#
# router-ios#sh running-config | section ^interface
# interface GigabitEthernet0/0
# interface GigabitEthernet0/1
# ipv6 ospf 55 area 105
# ipv6 ospf priority 20
# ipv6 ospf transmit-delay 30
# ipv6 ospf adjacency stagger disable
# interface GigabitEthernet0/2
# ip ospf priority 40
# ip ospf adjacency stagger disable
# ip ospf ttl-security hops 50
# ip ospf 10 area 20
# ip ospf cost 30
# Using replaced
# Before state:
# -------------
#
# router-ios#sh running-config | section ^interface
# interface GigabitEthernet0/0
# interface GigabitEthernet0/1
# ip ospf network broadcast
# ip ospf resync-timeout 10
# ip ospf dead-interval 5
# ip ospf priority 25
# ip ospf demand-circuit ignore
# ip ospf bfd
# ip ospf adjacency stagger disable
# ip ospf ttl-security hops 50
# ip ospf shutdown
# ip ospf 10 area 30
# ip ospf cost 5
# ipv6 ospf 35 area 45
# ipv6 ospf priority 55
# ipv6 ospf transmit-delay 45
# ipv6 ospf database-filter all out
# ipv6 ospf adjacency stagger disable
# ipv6 ospf manet peering link-metrics 10
# interface GigabitEthernet0/2
- name: Replaced provided OSPF Interfaces configuration
cisco.ios.ios_ospf_interfaces:
config:
- name: GigabitEthernet0/2
address_family:
- afi: ipv6
process:
id: 55
area_id: 105
adjacency: true
priority: 20
transmit_delay: 30
state: replaced
# Task Output:
# ------------
#
# before:
# - name: GigabitEthernet0/0
# - address_family:
# - adjacency: true
# afi: ipv4
# bfd: true
# cost:
# interface_cost: 5
# dead_interval:
# time: 5
# demand_circuit:
# enable: true
# ignore: true
# network:
# broadcast: true
# priority: 25
# process:
# area_id: '30'
# id: 10
# resync_timeout: 10
# shutdown: true
# ttl_security:
# hops: 50
# set: true
# - adjacency: true
# afi: ipv6
# database_filter: true
# manet:
# link_metrics:
# cost_threshold: 10
# priority: 55
# process:
# area_id: '45'
# id: 35
# transmit_delay: 45
# name: GigabitEthernet0/1
# - name: GigabitEthernet0/2
#
# commands:
# - interface GigabitEthernet0/2
# - ipv6 ospf 55 area 105
# - ipv6 ospf adjacency stagger disable
# - ipv6 ospf priority 20
# - ipv6 ospf transmit-delay 30
#
# after:
# - name: GigabitEthernet0/0
# - address_family:
# - adjacency: true
# afi: ipv4
# bfd: true
# cost:
# interface_cost: 5
# dead_interval:
# time: 5
# demand_circuit:
# enable: true
# ignore: true
# network:
# broadcast: true
# priority: 25
# process:
# area_id: '30'
# id: 10
# resync_timeout: 10
# shutdown: true
# ttl_security:
# hops: 50
# set: true
# - adjacency: true
# afi: ipv6
# database_filter: true
# manet:
# link_metrics:
# cost_threshold: 10
# priority: 55
# process:
# area_id: '45'
# id: 35
# transmit_delay: 45
# name: GigabitEthernet0/1
# - address_family:
# - adjacency: true
# afi: ipv6
# priority: 20
# process:
# area_id: '105'
# id: 55
# transmit_delay: 30
# name: GigabitEthernet0/2
# After state:
# ------------
# router-ios#sh running-config | section ^interface
# interface GigabitEthernet0/0
# interface GigabitEthernet0/1
# ip ospf network broadcast
# ip ospf resync-timeout 10
# ip ospf dead-interval 5
# ip ospf priority 25
# ip ospf demand-circuit ignore
# ip ospf bfd
# ip ospf adjacency stagger disable
# ip ospf ttl-security hops 50
# ip ospf shutdown
# ip ospf 10 area 30
# ip ospf cost 5
# ipv6 ospf 35 area 45
# ipv6 ospf priority 55
# ipv6 ospf transmit-delay 45
# ipv6 ospf database-filter all out
# ipv6 ospf adjacency stagger disable
# ipv6 ospf manet peering link-metrics 10
# interface GigabitEthernet0/2
# ipv6 ospf 55 area 105
# ipv6 ospf priority 20
# ipv6 ospf transmit-delay 30
# ipv6 ospf adjacency stagger disable
# Using Gathered
# Before state:
# -------------
#
# router-ios#sh running-config | section ^interface
# interface GigabitEthernet0/0
# interface GigabitEthernet0/1
# ip ospf network broadcast
# ip ospf resync-timeout 10
# ip ospf dead-interval 5
# ip ospf priority 25
# ip ospf demand-circuit ignore
# ip ospf bfd
# ip ospf adjacency stagger disable
# ip ospf ttl-security hops 50
# ip ospf shutdown
# ip ospf 10 area 30
# ip ospf cost 5
# ipv6 ospf 35 area 45
# ipv6 ospf priority 55
# ipv6 ospf transmit-delay 45
# ipv6 ospf database-filter all out
# ipv6 ospf adjacency stagger disable
# ipv6 ospf manet peering link-metrics 10
# interface GigabitEthernet0/2
- name: Gather OSPF Interfaces provided configurations
cisco.ios.ios_ospf_interfaces:
config:
state: gathered
# Task Output:
# ------------
#
# gathered:
# - name: GigabitEthernet0/0
# - address_family:
# - adjacency: true
# afi: ipv4
# bfd: true
# cost:
# interface_cost: 5
# dead_interval:
# time: 5
# demand_circuit:
# enable: true
# ignore: true
# network:
# broadcast: true
# priority: 25
# process:
# area_id: '30'
# id: 10
# resync_timeout: 10
# shutdown: true
# ttl_security:
# hops: 50
# set: true
# - adjacency: true
# afi: ipv6
# database_filter: true
# manet:
# link_metrics:
# cost_threshold: 10
# priority: 55
# process:
# area_id: '45'
# id: 35
# transmit_delay: 45
# name: GigabitEthernet0/1
# - name: GigabitEthernet0/2
# After state:
# ------------
#
# router-ios#sh running-config | section ^interface
# interface GigabitEthernet0/0
# interface GigabitEthernet0/1
# ip ospf network broadcast
# ip ospf resync-timeout 10
# ip ospf dead-interval 5
# ip ospf priority 25
# ip ospf demand-circuit ignore
# ip ospf bfd
# ip ospf adjacency stagger disable
# ip ospf ttl-security hops 50
# ip ospf shutdown
# ip ospf 10 area 30
# ip ospf cost 5
# ipv6 ospf 35 area 45
# ipv6 ospf priority 55
# ipv6 ospf transmit-delay 45
# ipv6 ospf database-filter all out
# ipv6 ospf adjacency stagger disable
# ipv6 ospf manet peering link-metrics 10
# interface GigabitEthernet0/2
# Using Rendered
- name: Render the commands for provided configuration
cisco.ios.ios_ospf_interfaces:
config:
- name: GigabitEthernet0/1
address_family:
- afi: ipv4
process:
id: 10
area_id: 30
adjacency: true
bfd: true
cost:
interface_cost: 5
dead_interval:
time: 5
demand_circuit:
ignore: true
network:
broadcast: true
priority: 25
resync_timeout: 10
shutdown: true
ttl_security:
hops: 50
- afi: ipv6
process:
id: 35
area_id: 45
adjacency: true
database_filter: true
manet:
link_metrics:
cost_threshold: 10
priority: 55
transmit_delay: 45
state: rendered
# Task Output:
# ------------
#
# rendered:
# - interface GigabitEthernet0/1
# - ip ospf 10 area 30
# - ip ospf adjacency stagger disable
# - ip ospf bfd
# - ip ospf cost 5
# - ip ospf dead-interval 5
# - ip ospf demand-circuit ignore
# - ip ospf network broadcast
# - ip ospf priority 25
# - ip ospf resync-timeout 10
# - ip ospf shutdown
# - ip ospf ttl-security hops 50
# - ipv6 ospf 35 area 45
# - ipv6 ospf adjacency stagger disable
# - ipv6 ospf database-filter all out
# - ipv6 ospf manet peering link-metrics 10
# - ipv6 ospf priority 55
# - ipv6 ospf transmit-delay 45
#
# Using Parsed
# File: parsed.cfg
# ----------------
#
# interface GigabitEthernet0/2
# interface GigabitEthernet0/1
# ip ospf network broadcast
# ip ospf resync-timeout 10
# ip ospf dead-interval 5
# ip ospf priority 25
# ip ospf demand-circuit ignore
# ip ospf bfd
# ip ospf adjacency stagger disable
# ip ospf ttl-security hops 50
# ip ospf shutdown
# ip ospf 10 area 30
# ip ospf cost 5
# ipv6 ospf 35 area 45
# ipv6 ospf priority 55
# ipv6 ospf transmit-delay 45
# ipv6 ospf database-filter all out
# ipv6 ospf adjacency stagger disable
# ipv6 ospf manet peering link-metrics 10
# interface GigabitEthernet0/0
- name: Parse the provided configuration with the existing running configuration
cisco.ios.ios_ospf_interfaces:
running_config: "{{ lookup('file', 'parsed.cfg') }}"
state: parsed
# Task Output:
# ------------
#
# parsed:
# - name: GigabitEthernet0/2
# - address_family:
# - adjacency: true
# afi: ipv4
# bfd: true
# cost:
# interface_cost: 5
# dead_interval:
# time: 5
# demand_circuit:
# enable: true
# ignore: true
# network:
# broadcast: true
# priority: 25
# process:
# area_id: '30'
# id: 10
# resync_timeout: 10
# shutdown: true
# ttl_security:
# hops: 50
# set: true
# - adjacency: true
# afi: ipv6
# database_filter: true
# manet:
# link_metrics:
# cost_threshold: 10
# priority: 55
# process:
# area_id: '45'
# id: 35
# transmit_delay: 45
# name: GigabitEthernet0/1
# - name: GigabitEthernet0/0
返回值
通用返回值记录在 此处,以下是此模块独有的字段。
键 |
描述 |
---|---|
模块执行后的结果配置。 返回: 当发生更改时 示例: |
|
模块执行之前的配置。 返回: 当 state 为 示例: |
|
推送到远程设备的命令集。 返回: 当 state 为 示例: |
|
从远程设备收集的网络资源信息,以结构化数据形式表示。 返回: 当 state 为 示例: |
|
在 running_config 选项中提供的设备原生配置,按照模块 argspec 解析为结构化数据。 返回: 当 state 为 示例: |
|
在任务中提供的配置,以设备原生格式呈现(离线)。 返回: 当 state 为 示例: |