community.network.ce_startup 模块 – 管理华为CloudEngine交换机的系统启动信息。

注意

此模块是 community.network 集合 (版本 5.1.0) 的一部分。

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

要安装它,请使用: ansible-galaxy collection install community.network

要在playbook中使用它,请指定: community.network.ce_startup

注意

community.network 集合已弃用,并将从 Ansible 12 中删除。有关更多信息,请参阅 讨论主题

已弃用

在以下版本中移除:

版本 6.0.0

原因:

此集合及其中的所有内容均未维护且已弃用。

替代方案:

未知。

概要

  • 管理华为CloudEngine交换机的系统启动信息。

别名:network.cloudengine.ce_startup

参数

参数

注释

action

字符串

显示启动信息。

选项

  • "display"

cfg_file

字符串

应用于下次启动的配置文件的名称。值为5到255个字符的字符串。

默认值: "present"

patch_file

字符串

应用于下次启动的补丁文件的名称。

slot

字符串

设备的位置。值为1到32个字符的字符串。slot 的可能值为all、slave-board或特定的slotID。

software_file

字符串

应用于下次启动的系统软件的文件名。值为5到255个字符的字符串。

备注

注意

  • 推荐的连接方式是 network_cli

  • 此模块也适用于旧版playbook的 local 连接。

示例

- name: Startup module test
  hosts: cloudengine
  connection: local
  gather_facts: false
  vars:
    cli:
      host: "{{ inventory_hostname }}"
      port: "{{ ansible_ssh_port }}"
      username: "{{ username }}"
      password: "{{ password }}"
      transport: cli

  tasks:

  - name: Display startup information
    community.network.ce_startup:
      action: display
      provider: "{{ cli }}"

  - name: Set startup patch file
    community.network.ce_startup:
      patch_file: 2.PAT
      slot: all
      provider: "{{ cli }}"

  - name: Set startup software file
    community.network.ce_startup:
      software_file: aa.cc
      slot: 1
      provider: "{{ cli }}"

  - name: Set startup cfg file
    community.network.ce_startup:
      cfg_file: 2.cfg
      slot: 1
      provider: "{{ cli }}"

返回值

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

描述

changed

布尔值

检查设备上是否进行了更改

返回:始终

示例: true

end_state

字典

模块执行后aaa参数的k/v对

返回:始终

示例: {"StartupInfos": null}

existing

字典

现有aaa服务器的k/v对

返回:始终

示例: {"configSysSoft": "flash:/CE12800-V200R002C20_issuB071.cc", "curentPatchFile": "NULL", "curentStartupFile": "NULL", "curentSysSoft": "flash:/CE12800-V200R002C20_issuB071.cc", "nextPatchFile": "flash:/1.PAT", "nextStartupFile": "flash:/1.cfg", "nextSysSoft": "flash:/CE12800-V200R002C20_issuB071.cc", "position": "5"}

proposed

字典

传递到模块的参数的k/v对

返回:始终

示例: {"patch_file": "2.PAT", "slot": "all"}

updates

列表 / 元素=字符串

发送到设备的命令

返回:始终

示例: {"startup patch 2.PAT all": null}

状态

  • 此模块将在版本 6.0.0 中删除。 *[已弃用]*

  • 有关更多信息,请参阅 已弃用

作者

  • 李彦峰 (@QijunPan)