ansible.builtin.nxos_snmp_traps (v2.3.3.0-1) — module

Manages SNMP traps.

| "added in version" 2.2 of ansible.builtin"

Authors: Jason Edelman (@jedelman8)

preview | supported by community

Install Ansible via pip

Install with pip install ansible==2.3.3.0.post1

Description

Manages SNMP traps configurations.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# ensure lldp trap configured
- nxos_snmp_traps:
    group: lldp
    state: enabled
    host: "{{ inventory_hostname }}"
    username: "{{ un }}"
    password: "{{ pwd }}"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# ensure lldp trap is not configured
- nxos_snmp_traps:
    group: lldp
    state: disabled
    host: "{{ inventory_hostname }}"
    username: "{{ un }}"
    password: "{{ pwd }}"

Inputs

    
group:
    choices:
    - aaa
    - bridge
    - callhome
    - cfs
    - config
    - entity
    - feature-control
    - hsrp
    - license
    - link
    - lldp
    - ospf
    - pim
    - rf
    - rmon
    - snmp
    - storm-control
    - stpx
    - sysmgr
    - system
    - upgrade
    - vtp
    - all
    description:
    - Case sensitive group.
    required: true

state:
    choices:
    - enabled
    - disabled
    default: enabled
    description:
    - Manage the state of the resource.
    required: false

Outputs

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 trap info after module execution
  returned: always
  sample:
    lldp:
    - enabled: 'Yes'
      trap: lldpRemTablesChange
  type: dict
existing:
  description: k/v pairs of existing trap status
  returned: always
  sample:
    lldp:
    - enabled: 'No'
      trap: lldpRemTablesChange
  type: dict
proposed:
  description: k/v pairs of parameters passed into module
  returned: always
  sample:
    group: lldp
  type: dict
updates:
  description: command sent to the device
  returned: always
  sample: snmp-server enable traps lldp ;
  type: list