wti.remote.cpm_snmp_info 模块 – 从 WTI OOB 和 PDU 设备获取网络 SNMP 参数

注意

此模块是 wti.remote 集合 (版本 1.0.10) 的一部分。

如果您正在使用 ansible 包,您可能已经安装了此集合。 它不包含在 ansible-core 中。 要检查是否已安装,请运行 ansible-galaxy collection list

要安装它,请使用:ansible-galaxy collection install wti.remote

要在 playbook 中使用它,请指定:wti.remote.cpm_snmp_info

wti.remote 2.10.0 中的新增功能

概要

  • 从 WTI OOB 和 PDU 设备获取网络 SNMP 参数

参数

参数

注释

cpm_password

string / 必需

这是要发送模块的 WTI 设备的密码。

cpm_url

string / 必需

这是要发送模块的 WTI 设备的 URL。

cpm_username

string / 必需

这是要发送模块的 WTI 设备的用户名。

interface

list / elements=string

这是正在检索的以太网端口名称。它可以包含单个以太网

端口名称,多个用逗号分隔的以太网端口名称,或者未定义用于所有端口。

选择

  • "eth0"

  • "eth1"

  • "ppp0"

  • "qmimux0"

use_https

boolean

指定使用 https 连接还是 http 连接。

选择

  • false

  • true ← (默认)

use_proxy

boolean

标志,用于控制在存在 HTTP 代理环境变量时,查找是否会观察到这些变量。

选择

  • false ← (默认)

  • true

validate_certs

boolean

如果为 false,则不会验证 SSL 证书。 这应该仅在

使用自签名证书的个人控制站点上使用。

选择

  • false

  • true ← (默认)

注意

注意

  • module_defaults 中使用 groups/cpm 来设置 CPM 模块之间使用的通用选项。)

示例

- name: Get the network SNMP Parameters for all interfaces of a WTI device.
  cpm_interface_info:
    cpm_url: "nonexist.wti.com"
    cpm_username: "super"
    cpm_password: "super"
    use_https: true
    validate_certs: false


- name: Get the network SNMP Parameters for eth0 of a WTI device.
  cpm_interface_info:
    cpm_url: "nonexist.wti.com"
    cpm_username: "super"
    cpm_password: "super"
    use_https: false
    validate_certs: false
    interface: "eth0"

返回值

常见的返回值记录在此处,以下是此模块特有的字段

描述

数据

复杂

从发送的命令返回的输出 JSON

返回: 总是

snmpaccess

字典

模块执行后 WTI 设备当前 SNMP 信息的 k/v 对。

返回: 总是

示例: {"snmpaccess": [{"eth0": {"ietf-ipv4": [{"enable": 0, "users": [{"authpass": "testpass", "authpriv": "1", "authproto": "0", "index": "1", "privpass": "testpass", "privproto": "1", "username": "test10"}]}], "ietf-ipv6": [{"enable": 0, "users": [{"authpass": "testpass", "authpriv": "1", "authproto": "0", "index": "1", "privpass": "testpass", "privproto": "1", "username": "test10"}]}]}}]}

作者

  • Western Telematic Inc. (@wtinetworkgear)