Deprecated

Removed in 2.12

i

Reason:Doesn't support latest Pluribus Networks netvisor | Alternative:Latest modules will be pushed in Ansible future versions.

community.general.pn_vlan (0.1.1) — module

CLI command to create/delete a VLAN.

Authors: Pluribus Networks (@amitsi)

deprecated | 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

Execute vlan-create or vlan-delete command.

VLANs are used to isolate network traffic at Layer 2.The VLAN identifiers 0 and 4095 are reserved and cannot be used per the IEEE 802.1Q standard. The range of configurable VLAN identifiers is 2 through 4092.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: create a VLAN
  pn_vlan:
    state: 'present'
    pn_vlanid: 1854
    pn_scope: fabric
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: delete VLANs
  pn_vlan:
    state: 'absent'
    pn_vlanid: 1854

Inputs

    
state:
    choices:
    - present
    - absent
    description:
    - State the action to perform. Use 'present' to create vlan and 'absent' to delete
      vlan.
    required: true

pn_ports:
    description:
    - 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:
    choices:
    - fabric
    - local
    description:
    - Specify a scope for the VLAN.
    - Required for vlan-create.

pn_stats:
    description:
    - Specify if you want to collect statistics for a VLAN. Statistic collection is enabled
      by default.
    type: bool

pn_vlanid:
    description:
    - Specify a VLAN identifier for the VLAN. This is a value between 2 and 4092.
    required: true

pn_cliswitch:
    default: local
    description:
    - Target switch(es) to run the cli on.
    required: false

pn_clipassword:
    description:
    - Provide login password if user is not root.
    required: false

pn_cliusername:
    description:
    - Provide login username if user is not root.
    required: false

pn_description:
    description:
    - Specify a description for the VLAN.

pn_untagged_ports:
    description:
    - 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.

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(s).
  returned: always
  type: str
stderr:
  description: The set of error responses from the vlan command.
  returned: on error
  type: list
stdout:
  description: The set of responses from the vlan command.
  returned: always
  type: list