community.general.pn_stp_port (0.1.1) — module

CLI command to modify stp-port.

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 modify Spanning Tree Protocol (STP) parameters on ports.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Modify stp port
  pn_stp_port:
    pn_cliswitch: "sw01"
    state: "update"
    pn_port: "1"
    pn_filter: True
    pn_priority: '144'
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Modify stp port
  pn_stp_port:
    pn_cliswitch: "sw01"
    state: "update"
    pn_port: "1"
    pn_cost: "200"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Modify stp port
  pn_stp_port:
    pn_cliswitch: "sw01"
    state: "update"
    pn_port: "1"
    pn_edge: True
    pn_cost: "200"

Inputs

    
state:
    choices:
    - update
    description:
    - State the action to perform. Use C(update) to update stp-port.
    required: true
    type: str

pn_cost:
    default: '2000'
    description:
    - STP port cost from 1 to 200000000.
    type: str

pn_edge:
    description:
    - STP port is an edge port.
    type: bool

pn_port:
    description:
    - STP port.
    type: str

pn_block:
    description:
    - Specify if a STP port blocks BPDUs.
    type: bool

pn_filter:
    description:
    - STP port filters BPDUs.
    type: bool

pn_priority:
    default: '128'
    description:
    - STP port priority from 0 to 240.
    type: str

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

pn_bpdu_guard:
    description:
    - STP port BPDU guard.
    type: bool

pn_root_guard:
    description:
    - STP port Root guard.
    type: bool

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