Note
This plugin is part of the community.network collection.
To install it use: ansible-galaxy collection install community.network.
To use it in a playbook, specify: community.network.pn_vlan.
version 2.0.0
Doesn’t support latest Pluribus Networks netvisor
Latest modules will be pushed in Ansible future versions.
| Parameter | Choices/Defaults | Comments |
|---|---|---|
| pn_clipassword string | Provide login password if user is not root. | |
| pn_cliswitch string | Default: "local" | Target switch(es) to run the cli on. |
| pn_cliusername string | Provide login username if user is not root. | |
| pn_description string | Specify a description for the VLAN. | |
| pn_ports string | Specifies the switch network data port number, list of ports, or range of ports. Port numbers must ne in the range of 1 to 64. | |
| pn_scope string |
| Specify a scope for the VLAN. Required for vlan-create. |
| pn_stats boolean |
| Specify if you want to collect statistics for a VLAN. Statistic collection is enabled by default. |
| pn_untagged_ports string | Specifies the ports that should have untagged packets mapped to the VLAN. Untagged packets are packets that do not contain IEEE 802.1Q VLAN tags. | |
| pn_vlanid string / required | Specify a VLAN identifier for the VLAN. This is a value between 2 and 4092. | |
| state string / required |
| State the action to perform. Use 'present' to create vlan and 'absent' to delete vlan. |
- name: Create a VLAN
community.network.pn_vlan:
state: 'present'
pn_vlanid: 1854
pn_scope: fabric
- name: Delete VLANs
community.network.pn_vlan:
state: 'absent'
pn_vlanid: 1854
Common return values are documented here, the following are the fields unique to this module:
| Key | Returned | Description |
|---|---|---|
| changed boolean | always | Indicates whether the CLI caused changes on the target. |
| command string | always | The CLI command run on the target node(s). |
| stderr list / elements=string | on error | The set of error responses from the vlan command. |
| stdout list / elements=string | always | The set of responses from the vlan command. |
© 2012–2018 Michael DeHaan
© 2018–2019 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/2.10/collections/community/network/pn_vlan_module.html