wti.remote.cpm_serial_port_info 模块 – 获取 WTI OOB 和 PDU 设备中的串口参数
注意
此模块是 wti.remote 集合(版本 1.0.10)的一部分。
如果您正在使用 ansible
包,您可能已经安装了此集合。它不包含在 ansible-core
中。要检查它是否已安装,请运行 ansible-galaxy collection list
。
要安装它,请使用:ansible-galaxy collection install wti.remote
。
要在 playbook 中使用它,请指定:wti.remote.cpm_serial_port_info
。
wti.remote 2.9.0 中的新增功能
概要
从 WTI OOB 和 PDU 设备获取串口参数
参数
参数 |
注释 |
---|---|
这是 WTI 设备的密码,用于发送模块。 |
|
这是 WTI 设备的 URL,用于发送模块。 |
|
这是 WTI 设备的用户名,用于发送模块。 |
|
这是正在检索的串口号。它可以包含单个端口 号,多个用逗号分隔的端口号,端口号列表,或者用于所有端口的“*”字符。 默认值: |
|
指定使用 https 连接还是 http 连接。 选择
|
|
标志,用于控制查找是否在存在 HTTP 代理环境变量时观察它们。 选择
|
|
如果为 false,则不会验证 SSL 证书。这应该只在 使用自签名证书的个人控制站点上使用。 选择
|
注释
注意
在
module_defaults
中使用groups/cpm
来设置 CPM 模块之间使用的常用选项。)
示例
- name: Get the Serial Port Parameters for port 2 of a WTI device
cpm_serial_port_info:
cpm_url: "nonexist.wti.com"
cpm_username: "super"
cpm_password: "super"
use_https: true
validate_certs: false
port: 2
- name: Get the Serial Port Parameters for ports 2 and 4 of a WTI device
cpm_serial_port_info:
cpm_url: "nonexist.wti.com"
cpm_username: "super"
cpm_password: "super"
use_https: true
validate_certs: false
port: 2,4
- name: Get the Serial Port Parameters for all ports of a WTI device
cpm_serial_port_info:
cpm_url: "nonexist.wti.com"
cpm_username: "super"
cpm_password: "super"
use_https: true
validate_certs: false
port: "*"
返回值
通用返回值已在此处记录,以下是此模块独有的字段
键 |
描述 |
---|---|
从发送的命令返回的 JSON 输出 返回: 总是 |
|
每个串口的数据列表 返回: 成功 示例: |