community.network.ce_stp module – Manages STP configuration on HUAWEI CloudEngine switches.
Note
This module is part of the community.network collection (version 5.1.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.ce_stp
.
Note
The community.network collection has been deprecated and will be removed from Ansible 12. See the discussion thread for more information.
DEPRECATED
- Removed in:
version 6.0.0
- Why:
This collection and all content in it is unmaintained and deprecated.
- Alternative:
Unknown.
Synopsis
Manages STP configurations on HUAWEI CloudEngine switches.
Aliases: network.cloudengine.ce_stp
Parameters
Parameter |
Comments |
---|---|
Specify a port as a BPDU filter port. Choices:
|
|
Configure BPDU protection on an edge port. This function prevents network flapping caused by attack packets. Choices:
|
|
Set the path cost of the current port. The default instance is 0. |
|
Set the current port as an edge port. Choices:
|
|
Interface name. If the value is |
|
Enable loop protection on the current port. Choices:
|
|
Enable root protection on the current port. Choices:
|
|
Specify desired state of the resource. Choices:
|
|
STP convergence mode. Fast means set STP aging mode to Fast. Normal means set STP aging mode to Normal. Choices:
|
|
Enable or disable STP on a switch. Choices:
|
|
Set an operation mode for the current MSTP process. The mode can be STP, RSTP, or MSTP. Choices:
|
|
Configure the TC BPDU protection function for an MSTP process. Choices:
|
|
Set the time the MSTP device takes to handle the maximum number of TC BPDUs and immediately refresh forwarding entries. The value is an integer ranging from 1 to 600, in seconds. |
|
Set the maximum number of TC BPDUs that the MSTP can handle. The value is an integer ranging from 1 to 255. The default value is 1 on the switch. |
Notes
Note
Recommended connection is
network_cli
.This module also works with
local
connections for legacy playbooks.
Examples
- name: CloudEngine stp test
hosts: cloudengine
connection: local
gather_facts: false
tasks:
- name: "Config stp mode"
community.network.ce_stp:
state: present
stp_mode: stp
- name: "Undo stp mode"
community.network.ce_stp:
state: absent
stp_mode: stp
- name: "Enable bpdu protection"
community.network.ce_stp:
state: present
bpdu_protection: enable
- name: "Disable bpdu protection"
community.network.ce_stp:
state: present
bpdu_protection: disable
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
check to see if a change was made on the device Returned: always Sample: |
|
k/v pairs of aaa params after module execution Returned: always Sample: |
|
k/v pairs of existing aaa server Returned: always Sample: |
|
k/v pairs of parameters passed into module Returned: always Sample: |
|
command sent to the device Returned: always Sample: |
Status
This module will be removed in version 6.0.0. [deprecated]
For more information see DEPRECATED.