wti.remote.cpm_firmware_update 模块 – 在 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_firmware_update

wti.remote 2.9.0 中的新功能

概要

  • 在 WTI OOB 和 PDU 设备中设置串口参数

参数

参数

注释

cpm_file

字符串

如果定义了文件,则此文件将用于更新 WTI 设备。

cpm_password

字符串 / 必需

这是 WTI 设备的密码,用于发送模块。

cpm_path

字符串

这是存储 WTI 设备配置文件的目录路径。

默认值: "/tmp/"

cpm_url

字符串 / 必需

这是 WTI 设备的 URL,用于发送模块。

cpm_username

字符串 / 必需

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

family

整数

强制下载到 Console (1) 或 Power (0)

选择

  • 0

  • 1 ← (默认)

removefileonexit

整数

升级后,删除升级的操作系统镜像

选择

  • 0

  • 1 ← (默认)

use_force

布尔值

如果设置为 True,即使设备不需要升级也会进行升级。

选择

  • false ← (默认)

  • true

use_https

布尔值

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

选择

  • false

  • true ← (默认)

use_proxy

布尔值

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

选择

  • false ← (默认)

  • true

validate_certs

布尔值

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

选择

  • false

  • true ← (默认)

注意

注意

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

示例

# Upgrade the firmware of a WTI device
- name: Upgrade the firmware of a WTI device
  cpm_firmware_update:
    cpm_url: "nonexist.wti.com"
    cpm_username: "super"
    cpm_password: "super"
    use_https: true
    validate_certs: false


# Upgrade the firmware of a WTI device and keep the download OS image after exit
- name: Upgrade the firmware of a WTI device and keep the download OS image after exit
  cpm_firmware_update:
    cpm_url: "nonexist.wti.com"
    cpm_username: "super"
    cpm_password: "super"
    use_https: true
    validate_certs: false
    removefileonexit: "0"

返回值

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

描述

数据

复杂

正在更新的 WTI 设备的输出 XML 配置

返回值: 始终

filelength

整数

上传文件的长度(以字节为单位)

返回值: 成功

示例: [{"filelength": 329439}]

status

列表 / 元素=字符串

来自备份操作的状态返回列表

返回值: 成功

示例: [{"code": 0}, {"text": "ok"}, {"unittimestamp": "2020-02-14T00:18:57+00:00"}]

作者

  • Western Telematic Inc. (@wtinetworkgear)