community.network.pn_stp module – CLI command to modify stp

Note

This module is part of the community.network collection (version 3.3.0).

You might already have this collection installed if you are using the ansible package. It is not included in ansible-core. To check whether it is installed, run ansible-galaxy collection list.

To install it, use: ansible-galaxy collection install community.network.

To use it in a playbook, specify: community.network.pn_stp.

Synopsis

  • This module can be used to modify Spanning Tree Protocol parameters.

Parameters

Parameter

Comments

pn_bpdus_bridge_ports

boolean

BPDU packets to bridge specific port.

Choices:

  • no

  • yes

pn_bridge_id

string

STP bridge id.

pn_bridge_priority

string

STP bridge priority.

Default: “32768”

pn_cliswitch

string

Target switch to run the CLI on.

pn_enable

boolean

enable or disable STP

Choices:

  • no

  • yes

pn_forwarding_delay

string

STP forwarding delay between 4 and 30 secs.

Default: “15”

pn_hello_time

string

STP hello time between 1 and 10 secs.

Default: “2”

pn_max_age

string

maximum age time between 6 and 40 secs.

Default: “20”

pn_mst_config_name

string

Name for MST Configuration Instance.

pn_mst_max_hops

string

maximum hop count for mstp bpdu.

Default: “20”

pn_root_guard_wait_time

string

root guard wait time between 0 and 300 secs. 0 to disable wait.

Default: “20”

pn_stp_mode

string

STP mode.

Choices:

  • rstp

  • mstp

state

string / required

State the action to perform. Use update to stp.

Choices:

  • update

Examples

- name: Modify stp
  community.network.pn_stp:
    pn_cliswitch: "sw01"
    state: "update"
    pn_hello_time: "3"
    pn_stp_mode: "rstp"

Return Values

Common return values are documented here, the following are the fields unique to this module:

Key

Description

changed

boolean

indicates whether the CLI caused changes on the target.

Returned: always

command

string

the CLI command run on the target node.

Returned: always

stderr

list / elements=string

set of error responses from the stp command.

Returned: on error

stdout

list / elements=string

set of responses from the stp command.

Returned: always

Authors

  • Pluribus Networks (@rajaspachipulusu17)