cisco.iosxr.iosxr_logging_global 模块 – 用于配置日志的资源模块。
注意
此模块是 cisco.iosxr 集合(版本 10.2.2)的一部分。
如果您使用的是 ansible
包,您可能已经安装了此集合。它不包含在 ansible-core
中。要检查是否已安装,请运行 ansible-galaxy collection list
。
要安装它,请使用:ansible-galaxy collection install cisco.iosxr
。
要在 playbook 中使用它,请指定:cisco.iosxr.iosxr_logging_global
。
cisco.iosxr 2.4.0 中的新增功能
概要
此模块管理 Cisco IOSXR 网络设备的日志记录属性
参数
参数 |
注释 |
---|---|
日志记录选项的字典。 |
|
记录到持久设备(磁盘/硬盘) |
|
要维护的最大日志周数。 |
|
存档的总大小。 |
|
配置存档设备 |
|
单个日志文件的最大文件大小。 |
|
日志的收集间隔。 选择
|
|
日志严重级别 选择
|
|
阈值百分比 <1-99>。 |
|
设置缓冲日志记录参数 |
|
建立 MD-Buffer 关联 |
|
设置匹配/不匹配的鉴别器。 选择
|
|
鉴别器名称。 |
|
日志严重级别 选择
|
|
日志缓冲区大小 |
|
设置控制台日志记录参数 |
|
建立 MD-Buffer 关联 |
|
设置匹配/不匹配的鉴别器。 选择
|
|
鉴别器名称。 |
|
日志严重级别 选择
|
|
启用或禁用日志记录。 选择
|
|
配置事件相关器的属性 |
|
配置相关器缓冲区的大小。 |
|
配置指定的关联规则集。 |
|
规则集的名称 |
|
规则的名称 |
|
配置指定的关联规则。 |
|
指定在上下文中启用关联。 选择
|
|
指定在父项清除时重新发出非双稳态警报。此选项允许用于类型为有状态的规则。 选择
|
|
指定在父项清除时重新设置警报的父项。此选项允许用于类型为有状态的规则。 选择
|
|
规则的名称。 |
|
规则的类型 - 有状态或无状态。 选择
|
|
指定超时。 |
|
指定根本原因的超时。 |
|
配置事件监视参数。 |
|
设置本地事件缓冲区的大小。 |
|
在消息文本中包含警报源位置。 选择
|
|
配置过滤器。 |
|
日志严重级别 选择
|
|
容量警报阈值。 |
|
syslog 消息的 Facility 参数 选择
|
|
设置文件日志记录。 |
|
设置最大文件大小。 |
|
文件名称。 |
|
设置文件路径。 |
|
日志严重级别 选择
|
|
启用以发送 syslog 消息 rfc5424 格式。 选择
|
|
配置 syslog 历史表 |
|
日志严重级别 选择
|
|
日志缓冲区大小 |
|
启用或禁用日志记录。 选择
|
|
要添加到服务器消息中的主机名前缀。 |
|
设置 syslog 服务器 IP 地址和参数 |
|
syslog 服务器的 IPv4/Ipv6 地址或主机名 |
|
设置 <0-65535> 非默认端口。 默认值: |
|
日志严重级别 选择
|
|
设置 VRF 选项 默认值: |
|
为 ipv4 数据包标记 dscp/优先级位。 |
|
设置 IP DSCP(DiffServ 代码点)。请参考供应商文档以获取有效条目。 |
|
设置优先级。请参考供应商文档以获取有效条目。 |
|
为 ipv4 数据包标记 dscp/优先级位。 |
|
设置 IP DSCP(DiffServ 代码点)。请参考供应商文档以获取有效条目。 |
|
设置优先级。请参考供应商文档以获取有效条目。 |
|
设置本地日志文件的大小 |
|
设置终端线路(监视器)日志记录参数 |
|
建立 MD-Buffer 关联 |
|
设置匹配/不匹配的鉴别器。 选择
|
|
鉴别器名称。 |
|
日志严重级别 选择
|
|
启用或禁用日志记录。 选择
|
|
指定日志记录事务中源地址的接口 |
|
带编号的接口名称 |
|
VPN 路由/转发实例名称 |
|
禁止日志记录行为。 |
|
应用禁止规则。 |
|
禁止连续重复消息。 选择
|
|
通过 tls 保护服务器安全。 |
|
tls 对等配置的名称。 |
|
日志严重级别 选择
|
|
日志主机的名称。 |
|
配置的信任点名称。 |
|
VRF 的名称。 |
|
设置 syslog 服务器日志级别 |
|
日志严重级别 选择
|
|
启用或禁用日志记录。 选择
|
|
此选项仅在状态为parsed时使用。 此选项的值应是通过执行命令 show running-config | include logging 从 IOS 设备接收到的输出。 状态parsed从 |
|
配置应保持的状态 选择
|
备注
注意
已针对 IOSXR 7.0.2 进行测试。
此模块与连接
network_cli
配合使用。
示例
# Using merged
# -----------------
# Before state
# RP/0/0/CPU0:10#show running-config logging
# Thu Feb 4 09:38:36.245 UTC
# % No such configuration item(s)
# RP/0/0/CPU0:10#
#
#
- name: Merge the provided configuration with the existing running configuration
cisco.iosxr.iosxr_logging_global:
config:
buffered:
size: 2097152
severity: warnings
correlator:
buffer_size: 1024
events:
display_location: true
files:
- maxfilesize: '1024'
name: test
path: test
severity: info
hostnameprefix: test
hosts:
- host: 1.1.1.1
port: default
severity: critical
vrf: default
ipv4:
dscp: af11
localfilesize: 1024
monitor:
severity: errors
source_interfaces:
- interface: GigabitEthernet0/0/0/0
vrf: test
tls_servers:
- name: test
tls_hostname: test2
trustpoint: test2
vrf: test
trap:
severity: informational
state: merged
#
#
# After state:
# -------------------------------------------
# RP/0/0/CPU0:10#show running-config logging
# Tue Jul 20 18:09:18.491 UTC
# logging tls-server test
# vrf test
# trustpoint test2
# tls-hostname test2
# !
# logging file test path test maxfilesize 1024 severity info
# logging ipv4 dscp af11
# logging trap informational
# logging events display-location
# logging monitor errors
# logging buffered 2097152
# logging buffered warnings
# logging 1.1.1.1 vrf default severity critical port default
# logging correlator buffer-size 1024
# logging localfilesize 1024
# logging source-interface GigabitEthernet0/0/0/0 vrf test
# logging hostnameprefix test
# ------------------------------------------------
# Module execution
#
# "after": {
# "buffered": {
# "severity": "errors"
# },
# "correlator": {
# "buffer_size": 1024
# },
# "files": [
# {
# "maxfilesize": "1024",
# "name": "test",
# "path": "test1",
# "severity": "info"
# }
# ],
# "hostnameprefix": "test1",
# "hosts": [
# {
# "host": "1.1.1.3",
# "port": "default",
# "severity": "critical",
# "vrf": "default"
# }
# ],
# "ipv6": {
# "dscp": "af11"
# },
# "localfilesize": 1024,
# "source_interfaces": [
# {
# "interface": "GigabitEthernet0/0/0/0",
# "vrf": "test1"
# }
# ],
# "tls_servers": [
# {
# "name": "test",
# "tls_hostname": "test2",
# "trustpoint": "test",
# "vrf": "test"
# }
# ]
# },
# "before": {},
# "changed": true,
# "commands": [
# "logging buffered errors",
# "logging correlator buffer-size 1024",
# "logging hostnameprefix test1",
# "logging ipv6 dscp af11",
# "logging localfilesize 1024",
# "logging trap disable",
# "logging monitor disable",
# "logging history disable",
# "logging console disable",
# "logging 1.1.1.3 vrf default severity critical port default",
# "logging file test path test1 maxfilesize 1024 severity info",
# "logging source-interface GigabitEthernet0/0/0/0 vrf test1",
# "logging tls-server test tls-hostname test2",
# "logging tls-server test trustpoint test",
# "logging tls-server test vrf test"
# ],
# "invocation": {
# "module_args": {
# "config": {
# "archive": null,
# "buffered": {
# "discriminator": null,
# "severity": "errors",
# "size": null
# },
# "console": {
# "discriminator": null,
# "severity": null,
# "state": "disabled"
# },
# "correlator": {
# "buffer_size": 1024,
# "rule_set": null,
# "rules": null
# },
# "events": null,
# "facility": null,
# "files": [
# {
# "maxfilesize": "1024",
# "name": "test",
# "path": "test1",
# "severity": "info"
# }
# ],
# "format": null,
# "history": {
# "severity": null,
# "size": null,
# "state": "disabled"
# },
# "hostnameprefix": "test1",
# "hosts": [
# {
# "host": "1.1.1.3",
# "port": "default",
# "severity": "critical",
# "vrf": "default"
# }
# ],
# "ipv4": null,
# "ipv6": {
# "dscp": "af11",
# "precedence": null
# },
# "localfilesize": 1024,
# "monitor": {
# "discriminator": null,
# "severity": null,
# "state": "disabled"
# },
# "source_interfaces": [
# {
# "interface": "GigabitEthernet0/0/0/0",
# "vrf": "test1"
# }
# ],
# "suppress": null,
# "tls_servers": [
# {
# "name": "test",
# "severity": null,
# "tls_hostname": "test2",
# "trustpoint": "test",
# "vrf": "test"
# }
# ],
# "trap": {
# "severity": null,
# "state": "disabled"
# }
# },
# "running_config": null,
# "state": "merged"
# }
# }
# }
#
# Using replaced:
# -----------------------------------------------------------
#
# Before state
# RP/0/0/CPU0:10#show running-config logging
# Tue Jul 20 18:09:18.491 UTC
# logging tls-server test
# vrf test
# trustpoint test2
# tls-hostname test2
# !
# logging file test path test maxfilesize 1024 severity info
# logging ipv4 dscp af11
# logging trap informational
# logging events display-location
# logging monitor errors
# logging buffered 2097152
# logging buffered warnings
# logging 1.1.1.1 vrf default severity critical port default
# logging correlator buffer-size 1024
# logging localfilesize 1024
# logging source-interface GigabitEthernet0/0/0/0 vrf test
# logging hostnameprefix test
# -----------------------------------------------------------
#
- name: Replace BGP configuration with provided configuration
cisco.iosxr.iosxr_logging_global:
state: replaced
config:
buffered:
severity: errors
correlator:
buffer_size: 1024
files:
- maxfilesize: '1024'
name: test
path: test1
severity: info
hostnameprefix: test1
hosts:
- host: 1.1.1.3
port: default
severity: critical
vrf: default
ipv6:
dscp: af11
localfilesize: 1024
monitor:
severity: errors
tls_servers:
- name: test
tls_hostname: test2
trustpoint: test
vrf: test
trap:
severity: critical
#
# After state:
# RP/0/0/CPU0:10#show running-config logging
# Tue Jul 20 18:31:51.709 UTC
# logging tls-server test
# vrf test
# trustpoint test
# tls-hostname test2
# !
# logging file test path test1 maxfilesize 1024 severity info
# logging ipv6 dscp af11
# logging trap critical
# logging monitor errors
# logging buffered errors
# logging 1.1.1.3 vrf default severity critical port default
# logging correlator buffer-size 1024
# logging localfilesize 1024
# logging hostnameprefix test1
# -----------------------------------------------------------------
#
# Module Execution:
# "after": {
# "buffered": {
# "severity": "errors"
# },
# "correlator": {
# "buffer_size": 1024
# },
# "files": [
# {
# "maxfilesize": "1024",
# "name": "test",
# "path": "test1",
# "severity": "info"
# }
# ],
# "hostnameprefix": "test1",
# "hosts": [
# {
# "host": "1.1.1.3",
# "port": "default",
# "severity": "critical",
# "vrf": "default"
# }
# ],
# "ipv6": {
# "dscp": "af11"
# },
# "localfilesize": 1024,
# "monitor": {
# "severity": "errors"
# },
# "tls_servers": [
# {
# "name": "test",
# "tls_hostname": "test2",
# "trustpoint": "test",
# "vrf": "test"
# }
# ],
# "trap": {
# "severity": "critical"
# }
# },
# "before": {
# "buffered": {
# "severity": "warnings",
# "size": 2097152
# },
# "correlator": {
# "buffer_size": 1024
# },
# "events": {
# "display_location": true
# },
# "files": [
# {
# "maxfilesize": "1024",
# "name": "test",
# "path": "test",
# "severity": "info"
# }
# ],
# "hostnameprefix": "test",
# "hosts": [
# {
# "host": "1.1.1.1",
# "port": "default",
# "severity": "critical",
# "vrf": "default"
# }
# ],
# "ipv4": {
# "dscp": "af11"
# },
# "localfilesize": 1024,
# "monitor": {
# "severity": "errors"
# },
# "source_interfaces": [
# {
# "interface": "GigabitEthernet0/0/0/0",
# "vrf": "test"
# }
# ],
# "tls_servers": [
# {
# "name": "test",
# "tls_hostname": "test2",
# "trustpoint": "test2",
# "vrf": "test"
# }
# ],
# "trap": {
# "severity": "informational"
# }
# },
# "changed": true,
# "commands": [
# "no logging buffered 2097152",
# "no logging events display-location",
# "no logging ipv4 dscp af11",
# "no logging 1.1.1.1 vrf default severity critical port default",
# "no logging source-interface GigabitEthernet0/0/0/0 vrf test",
# "logging buffered errors",
# "logging hostnameprefix test1",
# "logging ipv6 dscp af11",
# "logging trap critical",
# "logging 1.1.1.3 vrf default severity critical port default",
# "logging file test path test1 maxfilesize 1024 severity info",
# "logging tls-server test trustpoint test"
# ],
#
#
#
# Using deleted:
# -----------------------------------------------------------
# Before state:
# RP/0/0/CPU0:10#show running-config logging
# Tue Jul 20 18:09:18.491 UTC
# logging tls-server test
# vrf test
# trustpoint test2
# tls-hostname test2
# !
# logging file test path test maxfilesize 1024 severity info
# logging ipv4 dscp af11
# logging trap informational
# logging events display-location
# logging monitor errors
# logging buffered 2097152
# logging buffered warnings
# logging 1.1.1.1 vrf default severity critical port default
# logging correlator buffer-size 1024
# logging localfilesize 1024
# logging source-interface GigabitEthernet0/0/0/0 vrf test
# logging hostnameprefix test
#
# -----------------------------------------------------------
- name: Delete given logging_global configuration
cisco.iosxr.iosxr_logging_global:
state: deleted
#
# After state:
# RP/0/0/CPU0:10#show running-config
#
# -------------------------------------------------------------
# Module Execution:
#
# "after": {},
# "before": {
# "buffered": {
# "severity": "warnings",
# "size": 2097152
# },
# "correlator": {
# "buffer_size": 1024
# },
# "events": {
# "display_location": true
# },
# "files": [
# {
# "maxfilesize": "1024",
# "name": "test",
# "path": "test",
# "severity": "info"
# }
# ],
# "hostnameprefix": "test",
# "hosts": [
# {
# "host": "1.1.1.1",
# "port": "default",
# "severity": "critical",
# "vrf": "default"
# }
# ],
# "ipv4": {
# "dscp": "af11"
# },
# "localfilesize": 1024,
# "monitor": {
# "severity": "errors"
# },
# "source_interfaces": [
# {
# "interface": "GigabitEthernet0/0/0/0",
# "vrf": "test"
# }
# ],
# "tls_servers": [
# {
# "name": "test",
# "tls_hostname": "test2",
# "trustpoint": "test2",
# "vrf": "test"
# }
# ],
# "trap": {
# "severity": "informational"
# }
# },
# "changed": true,
# "commands": [
# "no logging buffered 2097152",
# "no logging buffered warnings",
# "no logging correlator buffer-size 1024",
# "no logging events display-location",
# "no logging hostnameprefix test",
# "no logging ipv4 dscp af11",
# "no logging localfilesize 1024",
# "no logging monitor errors",
# "no logging trap informational",
# "no logging 1.1.1.1 vrf default severity critical port default",
# "no logging file test path test maxfilesize 1024 severity info",
# "no logging source-interface GigabitEthernet0/0/0/0 vrf test",
# "no logging tls-server test"
# ],
# "invocation": {
# "module_args": {
# "config": null,
# "running_config": null,
# "state": "deleted"
# }
# }
#
#
#
# using gathered:
# ------------------------------------------------------------
# Before state:
# RP/0/0/CPU0:10#show running-config logging
# Tue Jul 20 18:09:18.491 UTC
# logging tls-server test
# vrf test
# trustpoint test2
# tls-hostname test2
# !
# logging file test path test maxfilesize 1024 severity info
# logging ipv4 dscp af11
# logging trap informational
# logging events display-location
# logging monitor errors
# logging buffered 2097152
# logging buffered warnings
# logging 1.1.1.1 vrf default severity critical port default
# logging correlator buffer-size 1024
# logging localfilesize 1024
# logging source-interface GigabitEthernet0/0/0/0 vrf test
# logging hostnameprefix test
#
#
- name: Gather iosxr_logging_global facts using gathered state
cisco.iosxr.iosxr_logging_global:
state: gathered
#
# -------------------------------------------------------------
# Module Execution:
#
# "changed": false,
# "gathered": {
# "buffered": {
# "severity": "warnings",
# "size": 2097152
# },
# "correlator": {
# "buffer_size": 1024
# },
# "events": {
# "display_location": true
# },
# "files": [
# {
# "maxfilesize": "1024",
# "name": "test",
# "path": "test",
# "severity": "info"
# }
# ],
# "hostnameprefix": "test",
# "hosts": [
# {
# "host": "1.1.1.1",
# "port": "default",
# "severity": "critical",
# "vrf": "default"
# }
# ],
# "ipv4": {
# "dscp": "af11"
# },
# "localfilesize": 1024,
# "monitor": {
# "severity": "errors"
# },
# "source_interfaces": [
# {
# "interface": "GigabitEthernet0/0/0/0",
# "vrf": "test"
# }
# ],
# "tls_servers": [
# {
# "name": "test",
# "tls_hostname": "test2",
# "trustpoint": "test2",
# "vrf": "test"
# }
# ],
# "trap": {
# "severity": "informational"
# }
# },
# "invocation": {
# "module_args": {
# "config": null,
# "running_config": null,
# "state": "gathered"
# }
# }
#
#
# Using parsed:
# ---------------------------------------------------------------
#
# parsed.cfg
#
# logging tls-server test
# vrf test
# trustpoint test2
# tls-hostname test2
# !
# logging file test path test maxfilesize 1024 severity info
# logging ipv4 dscp af11
# logging trap informational
# logging events display-location
# logging monitor errors
# logging buffered 2097152
# logging buffered warnings
# logging 1.1.1.1 vrf default severity critical port default
# logging correlator buffer-size 1024
# logging localfilesize 1024
# logging source-interface GigabitEthernet0/0/0/0 vrf test
# logging hostnameprefix test
#
#
- name: Parse externally provided Logging global config to agnostic model
cisco.iosxr.iosxr_logging_global:
running_config: "{{ lookup('file', './fixtures/parsed.cfg') }}"
state: parsed
# ----------------------------------------------------------------
# Module execution:
# "changed": false,
# "parsed": {
# "buffered": {
# "severity": "warnings",
# "size": 2097152
# },
# "correlator": {
# "buffer_size": 1024
# },
# "events": {
# "display_location": true
# },
# "files": [
# {
# "maxfilesize": "1024",
# "name": "test",
# "path": "test",
# "severity": "info"
# }
# ],
# "hostnameprefix": "test",
# "hosts": [
# {
# "host": "1.1.1.1",
# "port": "default",
# "severity": "critical",
# "vrf": "default"
# }
# ],
# "ipv4": {
# "dscp": "af11"
# },
# "localfilesize": 1024,
# "monitor": {
# "severity": "errors"
# },
# "source_interfaces": [
# {
# "interface": "GigabitEthernet0/0/0/0",
# "vrf": "test"
# }
# ],
# "tls_servers": [
# {
# "name": "test",
# "tls_hostname": "test2",
# "trustpoint": "test2",
# "vrf": "test"
# }
# ],
# "trap": {
# "severity": "informational"
# }
# }
#
#
# Using rendered:
# ----------------------------------------------------------------------------
- name: >-
Render platform specific configuration lines with state rendered (without
connecting to the device)
cisco.iosxr.iosxr_logging_global:
state: rendered
config:
buffered:
size: 2097152
severity: warnings
correlator:
buffer_size: 1024
events:
display_location: true
files:
- maxfilesize: '1024'
name: test
path: test
severity: info
hostnameprefix: test
hosts:
- host: 1.1.1.1
port: default
severity: critical
vrf: default
ipv4:
dscp: af11
localfilesize: 1024
monitor:
severity: errors
source_interfaces:
- interface: GigabitEthernet0/0/0/0
vrf: test
tls_servers:
- name: test
tls_hostname: test2
trustpoint: test2
vrf: test
trap:
severity: informational
# ----------------------------------------------------------------
# Module Execution:
# "rendered": [
# "logging buffered errors",
# "logging correlator buffer-size 1024",
# "logging hostnameprefix test1",
# "logging ipv6 dscp af11",
# "logging localfilesize 1024",
# "logging trap disable",
# "logging monitor disable",
# "logging history disable",
# "logging console disable",
# "logging 1.1.1.3 vrf default severity critical port default",
# "logging file test path test1 maxfilesize 1024 severity info",
# "logging source-interface GigabitEthernet0/0/0/0 vrf test1",
# "logging tls-server test tls-hostname test2",
# "logging tls-server test trustpoint test",
# "logging tls-server test vrf test"
# ]
#
# Using overridden:
# ---------------------------------------------------------------------------------
# Before state:
# RP/0/0/CPU0:10#show running-config logging
# Tue Jul 20 18:09:18.491 UTC
# logging tls-server test
# vrf test
# trustpoint test2
# tls-hostname test2
# !
# logging file test path test maxfilesize 1024 severity info
# logging ipv4 dscp af11
# logging trap informational
# logging events display-location
# logging monitor errors
# logging buffered 2097152
# logging buffered warnings
# logging 1.1.1.1 vrf default severity critical port default
# logging correlator buffer-size 1024
# logging localfilesize 1024
# logging source-interface GigabitEthernet0/0/0/0 vrf test
# logging hostnameprefix test
#
# -----------------------------------------------------------
#
- name: Overridde logging global configuration with provided configuration
cisco.iosxr.iosxr_logging_global:
state: overridden
config:
buffered:
severity: errors
correlator:
buffer_size: 1024
files:
- maxfilesize: '1024'
name: test
path: test1
severity: info
hostnameprefix: test1
hosts:
- host: 1.1.1.3
port: default
severity: critical
vrf: default
ipv6:
dscp: af11
localfilesize: 1024
monitor:
severity: errors
tls_servers:
- name: test
tls_hostname: test2
trustpoint: test
vrf: test
trap:
severity: critical
#
# After state:
# RP/0/0/CPU0:10#show running-config logging
# Tue Jul 20 18:31:51.709 UTC
# logging tls-server test
# vrf test
# trustpoint test
# tls-hostname test2
# !
# logging file test path test1 maxfilesize 1024 severity info
# logging ipv6 dscp af11
# logging trap critical
# logging monitor errors
# logging buffered errors
# logging 1.1.1.3 vrf default severity critical port default
# logging correlator buffer-size 1024
# logging localfilesize 1024
# logging hostnameprefix test1
# -----------------------------------------------------------------
#
# Module Execution:
# "after": {
# "buffered": {
# "severity": "errors"
# },
# "correlator": {
# "buffer_size": 1024
# },
# "files": [
# {
# "maxfilesize": "1024",
# "name": "test",
# "path": "test1",
# "severity": "info"
# }
# ],
# "hostnameprefix": "test1",
# "hosts": [
# {
# "host": "1.1.1.3",
# "port": "default",
# "severity": "critical",
# "vrf": "default"
# }
# ],
# "ipv6": {
# "dscp": "af11"
# },
# "localfilesize": 1024,
# "monitor": {
# "severity": "errors"
# },
# "tls_servers": [
# {
# "name": "test",
# "tls_hostname": "test2",
# "trustpoint": "test",
# "vrf": "test"
# }
# ],
# "trap": {
# "severity": "critical"
# }
# },
# "before": {
# "buffered": {
# "severity": "warnings",
# "size": 2097152
# },
# "correlator": {
# "buffer_size": 1024
# },
# "events": {
# "display_location": true
# },
# "files": [
# {
# "maxfilesize": "1024",
# "name": "test",
# "path": "test",
# "severity": "info"
# }
# ],
# "hostnameprefix": "test",
# "hosts": [
# {
# "host": "1.1.1.1",
# "port": "default",
# "severity": "critical",
# "vrf": "default"
# }
# ],
# "ipv4": {
# "dscp": "af11"
# },
# "localfilesize": 1024,
# "monitor": {
# "severity": "errors"
# },
# "source_interfaces": [
# {
# "interface": "GigabitEthernet0/0/0/0",
# "vrf": "test"
# }
# ],
# "tls_servers": [
# {
# "name": "test",
# "tls_hostname": "test2",
# "trustpoint": "test2",
# "vrf": "test"
# }
# ],
# "trap": {
# "severity": "informational"
# }
# },
# "changed": true,
# "commands": [
# "no logging buffered 2097152",
# "no logging events display-location",
# "no logging ipv4 dscp af11",
# "no logging 1.1.1.1 vrf default severity critical port default",
# "no logging source-interface GigabitEthernet0/0/0/0 vrf test",
# "logging buffered errors",
# "logging hostnameprefix test1",
# "logging ipv6 dscp af11",
# "logging trap critical",
# "logging 1.1.1.3 vrf default severity critical port default",
# "logging file test path test1 maxfilesize 1024 severity info",
# "logging tls-server test trustpoint test"
# ],
#
返回值
常用返回值记录在此处,以下是此模块特有的字段
键 |
描述 |
---|---|
模块执行后的最终配置。 返回: 当发生更改时 示例: |
|
模块执行之前的配置。 返回: 当状态为 *merged*、*replaced*、*overridden*、*deleted* 或 *purged* 时 示例: |
|
推送到远程设备的命令集。 返回: 当状态为 *merged*、*replaced*、*overridden*、*deleted* 或 *purged* 时 示例: |
|
从远程设备收集的关于网络资源的结构化数据的事实。 返回: 当状态为 *gathered* 时 示例: |
|
running_config 选项中提供的设备原生配置按照模块 argspec 解析为结构化数据。 返回: 当状态为 *parsed* 时 示例: |
|
任务中提供的配置以设备原生格式呈现(离线)。 返回: 当状态为 *rendered* 时 示例: |