community.network.ce_info_center_trap module – Manages information center trap configuration on HUAWEI CloudEngine switches.
Note
This module is part of the community.network collection (version 5.0.2).
You might already have this collection installed if you are using the ansible
package.
It is not included in ansible-core
.
To check whether it is installed, run ansible-galaxy collection list
.
To install it, use: ansible-galaxy collection install community.network
.
To use it in a playbook, specify: community.network.ce_info_center_trap
.
Synopsis
Manages information center trap configurations on HUAWEI CloudEngine switches.
Aliases: network.cloudengine.ce_info_center_trap
Parameters
Parameter |
Comments |
---|---|
Number of a channel. The value is an integer ranging from 0 to 9. The default value is 0. |
|
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]. |
|
Specify desired state of the resource. Choices:
|
|
Whether a trap buffer is enabled to output information. Choices:
|
|
Size of a trap buffer. The value is an integer ranging from 0 to 1024. The default value is 256. |
|
Whether a device is enabled to output alarms. Choices:
|
|
Trap level permitted to output. Choices:
|
|
Timestamp format of alarm information. Choices:
|
Notes
Note
This module requires the netconf system service be enabled on the remote device being managed.
Recommended connection is
netconf
.This module also works with
local
connections for legacy playbooks.
Examples
- name: CloudEngine info center trap 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: "Config trap buffer"
community.network.ce_info_center_trap:
state: present
trap_buff_enable: true
trap_buff_size: 768
provider: "{{ cli }}"
- name: "Undo trap buffer"
community.network.ce_info_center_trap:
state: absent
trap_buff_enable: true
trap_buff_size: 768
provider: "{{ cli }}"
- name: "Config trap module log level"
community.network.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"
community.network.ce_info_center_trap:
state: absent
module_name: aaa
channel_id: 1
trap_enable: true
trap_level: error
provider: "{{ cli }}"
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
check to see if a change was made on the device Returned: always Sample: |
|
k/v pairs of aaa params after module execution Returned: always Sample: |
|
k/v pairs of existing aaa server Returned: always Sample: |
|
k/v pairs of parameters passed into module Returned: always Sample: |
|
command sent to the device Returned: always Sample: |