community.general.ce_startup (0.1.1) — module

Manages a system startup information on HUAWEI CloudEngine switches.

Authors: Li Yanfeng (@QijunPan)

preview | supported by community

Install collection

Install with ansible-galaxy collection install community.general:==0.1.1


Add to requirements.yml

  collections:
    - name: community.general
      version: 0.1.1

Description

Manages a system startup information on HUAWEI CloudEngine switches.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: startup module test
  hosts: cloudengine
  connection: local
  gather_facts: no
  vars:
    cli:
      host: "{{ inventory_hostname }}"
      port: "{{ ansible_ssh_port }}"
      username: "{{ username }}"
      password: "{{ password }}"
      transport: cli

  tasks:

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

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

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

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

Inputs

    
slot:
    description:
    - Position of the device.The value is a string of 1 to 32 characters. The possible
      value of slot is all, slave-board, or the specific slotID.

action:
    choices:
    - display
    description:
    - Display the startup information.

cfg_file:
    default: present
    description:
    - Name of the configuration file that is applied for the next startup. The value is
      a string of 5 to 255 characters.

patch_file:
    description:
    - Name of the patch file that is applied for the next startup.

software_file:
    description:
    - File name of the system software that is applied for the next startup. The value
      is a string of 5 to 255 characters.

Outputs

changed:
  description: check to see if a change was made on the device
  returned: always
  sample: true
  type: bool
end_state:
  description: k/v pairs of aaa params after module execution
  returned: always
  sample:
    StartupInfos: null
  type: dict
existing:
  description: k/v pairs of existing aaa server
  returned: always
  sample:
    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'
  type: dict
proposed:
  description: k/v pairs of parameters passed into module
  returned: always
  sample:
    patch_file: 2.PAT
    slot: all
  type: dict
updates:
  description: command sent to the device
  returned: always
  sample:
    startup patch 2.PAT all: null
  type: list