community.general.pn_snmp_community (0.1.1) — module

CLI command to create/modify/delete snmp-community

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 SNMP communities for SNMPv1 or delete SNMP communities for SNMPv1 or modify SNMP communities for SNMPv1.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Create snmp community
  pn_snmp_community:
    pn_cliswitch: "sw01"
    state: "present"
    pn_community_string: "foo"
    pn_community_type: "read-write"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Delete snmp community
  pn_snmp_community:
    pn_cliswitch: "sw01"
    state: "absent"
    pn_community_string: "foo"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Modify snmp community
  pn_snmp_community:
    pn_cliswitch: "sw01"
    state: "update"
    pn_community_string: "foo"
    pn_community_type: "read-only"

Inputs

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

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

pn_community_type:
    choices:
    - read-only
    - read-write
    description:
    - community type.
    type: str

pn_community_string:
    description:
    - community name.
    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-community command.
  returned: on error
  type: list
stdout:
  description: set of responses from the snmp-community command.
  returned: always
  type: list