dladm_vlan - Manage VLAN interfaces on Solaris/illumos systems.

New in version 2.3.

Synopsis

  • Create or delete VLAN interfaces on Solaris/illumos systems.

Options

parameter required default choices comments
link
yes
VLAN underlying link name.
name
yes
VLAN interface name.
state
no present
  • present
  • absent
Create or delete Solaris/illumos VNIC.
temporary
no
Specifies that the VLAN interface is temporary. Temporary VLANs do not persist across reboots.
vlan_id
no
VLAN ID value for VLAN interface.
aliases: vid

Examples

name: Create 'vlan42' VLAN over 'bnx0' link
dladm_vlan: name=vlan42 link=bnx0 vlan_id=42 state=present

name: Remove 'vlan1337' VLAN interface
dladm_vlan: name=vlan1337 state=absent

Return Values

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

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

Status

This module is flagged as preview which means that it is not guaranteed to have a backwards compatible interface.

For help in developing on modules, should you be so inclined, please read Community Information & Contributing, Testing Ansible and Developing Modules.

© 2012–2018 Michael DeHaan
© 2018–2019 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/2.4/dladm_vlan_module.html