dladm_vnic - Manage VNICs on Solaris/illumos systems.

New in version 2.2.

Synopsis

Parameters

Parameter Choices/Defaults Comments
link
required
VNIC underlying link name.
mac Default:
no
Sets the VNIC's MAC address. Must be valid unicast MAC address.

aliases: macaddr
name
required
VNIC name.
state
    Choices:
  • present ←
  • absent
Create or delete Solaris/illumos VNIC.
temporary
bool
    Choices:
  • no ←
  • yes
Specifies that the VNIC is temporary. Temporary VNICs do not persist across reboots.
vlan Default:
no
Enable VLAN tagging for this VNIC. The VLAN tag will have id vlan.

aliases: vlan_id

Examples

# Create 'vnic0' VNIC over 'bnx0' link
- dladm_vnic:
    name: vnic0
    link: bnx0
    state: present

# Create VNIC with specified MAC and VLAN tag over 'aggr0'
- dladm_vnic:
    name: vnic1
    link: aggr0
    mac: '00:00:5E:00:53:23'
    vlan: 4

# Remove 'vnic0' VNIC
- dladm_vnic:
    name: vnic0
    link: bnx0
    state: absent

Return Values

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

Key Returned Description
link
string
always
VNIC underlying link name

Sample:
igb0
mac
string
if mac is specified
MAC address to use for VNIC

Sample:
00:00:5E:00:53:42
name
string
always
VNIC name

Sample:
vnic0
state
string
always
state of the target

Sample:
present
temporary
boolean
always
VNIC's persistence

Sample:
True
vlan
int
success
VLAN to use for VNIC

Sample:
42


Status

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

Maintenance

This module is flagged as community which means that it is maintained by the Ansible Community. See Module Maintenance & Support for more info.

For a list of other modules that are also maintained by the Ansible Community, see here.

Author

  • Adam Števko (@xen0l)

Hint

If you notice any issues in this documentation you can edit this document to improve it.