community.general.dladm_vlan (0.1.1) — module

Manage VLAN interfaces on Solaris/illumos systems.

Authors: Adam Števko (@xen0l)

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

Create or delete VLAN interfaces on Solaris/illumos systems.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Create 'vlan42' VLAN over 'bnx0' link
  dladm_vlan: name=vlan42 link=bnx0 vlan_id=42 state=present
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Remove 'vlan1337' VLAN interface
  dladm_vlan: name=vlan1337 state=absent

Inputs

    
link:
    description:
    - VLAN underlying link name.
    required: true

name:
    description:
    - VLAN interface name.
    required: true

state:
    choices:
    - present
    - absent
    default: present
    description:
    - Create or delete Solaris/illumos VNIC.
    required: false

vlan_id:
    aliases:
    - vid
    default: false
    description:
    - VLAN ID value for VLAN interface.
    required: false

temporary:
    default: false
    description:
    - Specifies that the VLAN interface is temporary. Temporary VLANs do not persist across
      reboots.
    required: false
    type: bool

Outputs

link:
  description: VLAN's underlying link name
  returned: always
  sample: e100g0
  type: str
name:
  description: VLAN name
  returned: always
  sample: vlan42
  type: str
state:
  description: state of the target
  returned: always
  sample: present
  type: str
temporary:
  description: specifies if operation will persist across reboots
  returned: always
  sample: true
  type: bool
vlan_id:
  description: VLAN ID
  returned: always
  sample: 42
  type: str