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

注意

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

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

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

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

wti.remote 2.10.0 中的新增功能

概要

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

参数

参数

注释

cpm_password

字符串 / 必需

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

cpm_url

字符串 / 必需

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

cpm_username

字符串 / 必需

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

use_https

布尔值

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

选项

  • false

  • true ← (默认)

use_proxy

布尔值

控制查找在存在时是否观察 HTTP 代理环境变量的标志。

选项

  • false ← (默认)

  • true

validate_certs

布尔值

如果为 false,则不会验证 SSL 证书。这应该只在使用自签名证书的个人控制站点上使用。

选项

  • false

  • true ← (默认)

备注

注意

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

示例

- name: Get the network IPTABLES Parameters for 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 IPTABLES Parameters for a WTI device.
  cpm_interface_info:
    cpm_url: "nonexist.wti.com"
    cpm_username: "super"
    cpm_password: "super"
    use_https: false
    validate_certs: false

返回值

公共返回值已在此处记录 此处,以下是此模块独有的字段

描述

data

复杂类型

发送的命令返回的输出 JSON

返回:始终

iptables

字典

模块执行后 WTI 设备的 IPTABLES 信息的当前键值对。

返回:始终

示例: {"iptables": [{"eth0": {"ietf-ipv4": [{"clear": 0, "entries": [{"entry": "test10", "index": "1"}, {"entry": "", "index": "2"}]}], "ietf-ipv6": [{"clear": 0, "entries": [{"entry": "test30", "index": "1"}, {"entry": "test40", "index": "2"}]}]}}]}

作者

  • Western Telematic Inc. (@wtinetworkgear)