ansible / ansible.builtin / v2.6.2 / module / ce_snmp_traps Manages SNMP traps configuration on HUAWEI CloudEngine switches. | "added in version" 2.4 of ansible.builtin" Authors: wangdezhuang (@CloudEngine-Ansible) preview | supported by communityansible.builtin.ce_snmp_traps (v2.6.2) — module
pip
Install with pip install ansible==2.6.2
Manages SNMP traps configurations on HUAWEI CloudEngine switches.
- name: CloudEngine snmp traps 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 SNMP trap all enable" ce_snmp_traps: state: present feature_name: all provider: "{{ cli }}" - name: "Config SNMP trap interface" ce_snmp_traps: state: present interface_type: 40GE interface_number: 2/0/1 provider: "{{ cli }}" - name: "Config SNMP trap port" ce_snmp_traps: state: present port_number: 2222 provider: "{{ cli }}"
trap_name: description: - Alarm trap name. port_number: description: - Source port number. feature_name: choices: - aaa - arp - bfd - bgp - cfg - configuration - dad - devm - dhcpsnp - dldp - driver - efm - erps - error-down - fcoe - fei - fei_comm - fm - ifnet - info - ipsg - ipv6 - isis - l3vpn - lacp - lcs - ldm - ldp - ldt - lldp - mpls_lspm - msdp - mstp - nd - netconf - nqa - nvo3 - openflow - ospf - ospfv3 - pim - pim-std - qos - radius - rm - rmon - securitytrap - smlktrap - snmp - ssh - stackmng - sysclock - sysom - system - tcp - telnet - trill - trunk - tty - vbst - vfs - virtual-perception - vrrp - vstm - all description: - Alarm feature name. interface_type: choices: - Ethernet - Eth-Trunk - Tunnel - 'NULL' - LoopBack - Vlanif - 100GE - 40GE - MTunnel - 10GE - GE - MEth - Vbdif - Nve description: - Interface type. interface_number: description: - Interface number.
changed: description: check to see if a change was made on the device returned: always sample: true type: boolean end_state: description: k/v pairs of aaa params after module execution returned: always sample: snmp-agent trap: - enable undo snmp-agent trap: [] type: dict existing: description: k/v pairs of existing aaa server returned: always sample: snmp-agent trap: [] undo snmp-agent trap: [] type: dict proposed: description: k/v pairs of parameters passed into module returned: always sample: feature_name: all state: present type: dict updates: description: command sent to the device returned: always sample: - snmp-agent trap enable type: list