community.general.pn_snmp_trap_sink (0.1.1) — module

CLI command to create/delete snmp-trap-sink

Authors: Pluribus Networks (@rajaspachipulusu17)

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

This module can be used to create a SNMP trap sink and delete a SNMP trap sink.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: snmp trap sink functionality
  pn_snmp_trap_sink:
    pn_cliswitch: "sw01"
    state: "present"
    pn_community: "foo"
    pn_type: "TRAP_TYPE_V2_INFORM"
    pn_dest_host: "192.168.67.8"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: snmp trap sink functionality
  pn_snmp_trap_sink:
    pn_cliswitch: "sw01"
    state: "absent"
    pn_community: "foo"
    pn_type: "TRAP_TYPE_V2_INFORM"
    pn_dest_host: "192.168.67.8"

Inputs

    
state:
    choices:
    - present
    - absent
    description:
    - State the action to perform. Use C(present) to create snmp-trap-sink and C(absent)
      to delete snmp-trap-sink.
    required: true
    type: str

pn_type:
    choices:
    - TRAP_TYPE_V1_TRAP
    - TRAP_TYPE_V2C_TRAP
    - TRAP_TYPE_V2_INFORM
    default: TRAP_TYPE_V2C_TRAP
    description:
    - trap type.
    type: str

pn_cliswitch:
    description:
    - Target switch to run the CLI on.
    required: false
    type: str

pn_community:
    description:
    - community type.
    type: str

pn_dest_host:
    description:
    - destination host.
    type: str

pn_dest_port:
    default: '162'
    description:
    - destination port.
    type: str

Outputs

changed:
  description: indicates whether the CLI caused changes on the target.
  returned: always
  type: bool
command:
  description: the CLI command run on the target node.
  returned: always
  type: str
stderr:
  description: set of error responses from the snmp-trap-sink command.
  returned: on error
  type: list
stdout:
  description: set of responses from the snmp-trap-sink command.
  returned: always
  type: list