community.general.ce_info_center_trap (0.1.1) — module

Manages information center trap configuration on HUAWEI CloudEngine switches.

Authors: wangdezhuang (@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 information center trap configurations on HUAWEI CloudEngine switches.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.

- name: CloudEngine info center trap 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: "Config trap buffer"
    ce_info_center_trap:
      state: present
      trap_buff_enable: true
      trap_buff_size: 768
      provider: "{{ cli }}"

  - name: "Undo trap buffer"
    ce_info_center_trap:
      state: absent
      trap_buff_enable: true
      trap_buff_size: 768
      provider: "{{ cli }}"

  - name: "Config trap module log level"
    ce_info_center_trap:
      state: present
      module_name: aaa
      channel_id: 1
      trap_enable: true
      trap_level: error
      provider: "{{ cli }}"

  - name: "Undo trap module log level"
    ce_info_center_trap:
      state: absent
      module_name: aaa
      channel_id: 1
      trap_enable: true
      trap_level: error
      provider: "{{ cli }}"

Inputs

    
state:
    choices:
    - present
    - absent
    default: present
    description:
    - Specify desired state of the resource.

channel_id:
    description:
    - Number of a channel. The value is an integer ranging from 0 to 9. The default value
      is 0.

trap_level:
    choices:
    - emergencies
    - alert
    - critical
    - error
    - warning
    - notification
    - informational
    - debugging
    description:
    - Trap level permitted to output.

module_name:
    description:
    - Module name of the rule. The value is a string of 1 to 31 case-insensitive characters.
      The default value is default. Please use lower-case letter, such as [aaa, acl, arp,
      bfd].

trap_enable:
    choices:
    - no_use
    - 'true'
    - 'false'
    default: no_use
    description:
    - Whether a device is enabled to output alarms.

trap_buff_size:
    description:
    - Size of a trap buffer. The value is an integer ranging from 0 to 1024. The default
      value is 256.

trap_time_stamp:
    choices:
    - date_boot
    - date_second
    - date_tenthsecond
    - date_millisecond
    - shortdate_second
    - shortdate_tenthsecond
    - shortdate_millisecond
    - formatdate_second
    - formatdate_tenthsecond
    - formatdate_millisecond
    description:
    - Timestamp format of alarm information.

trap_buff_enable:
    choices:
    - no_use
    - 'true'
    - 'false'
    default: no_use
    description:
    - Whether a trap buffer is enabled to output information.

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:
    icTrapBuffEn: 'true'
    trapBuffSize: '768'
  type: dict
existing:
  description: k/v pairs of existing aaa server
  returned: always
  sample:
    icTrapBuffEn: 'false'
    trapBuffSize: '256'
  type: dict
proposed:
  description: k/v pairs of parameters passed into module
  returned: always
  sample:
    state: present
    trap_buff_enable: 'true'
    trap_buff_size: '768'
  type: dict
updates:
  description: command sent to the device
  returned: always
  sample:
  - info-center trapbuffer
  - info-center trapbuffer size 768
  type: list