community.network.dladm_vnic module – Manage VNICs on Solaris/illumos systems.
Note
This module is part of the community.network collection (version 5.0.2).
You might already have this collection installed if you are using the ansible
package.
It is not included in ansible-core
.
To check whether it is installed, run ansible-galaxy collection list
.
To install it, use: ansible-galaxy collection install community.network
.
To use it in a playbook, specify: community.network.dladm_vnic
.
Synopsis
Create or delete VNICs on Solaris/illumos systems.
Aliases: network.illumos.dladm_vnic
Parameters
Parameter |
Comments |
---|---|
VNIC underlying link name. |
|
Sets the VNIC’s MAC address. Must be valid unicast MAC address. |
|
VNIC name. |
|
Create or delete Solaris/illumos VNIC. Choices:
|
|
Specifies that the VNIC is temporary. Temporary VNICs do not persist across reboots. Choices:
|
|
Enable VLAN tagging for this VNIC. The VLAN tag will have id vlan. Default: |
Examples
- name: Create 'vnic0' VNIC over 'bnx0' link
community.network.dladm_vnic:
name: vnic0
link: bnx0
state: present
- name: Create VNIC with specified MAC and VLAN tag over 'aggr0'
community.network.dladm_vnic:
name: vnic1
link: aggr0
mac: '00:00:5E:00:53:23'
vlan: 4
- name: Remove 'vnic0' VNIC
community.network.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 |
Description |
---|---|
VNIC underlying link name Returned: always Sample: |
|
MAC address to use for VNIC Returned: if mac is specified Sample: |
|
VNIC name Returned: always Sample: |
|
state of the target Returned: always Sample: |
|
VNIC’s persistence Returned: always Sample: |
|
VLAN to use for VNIC Returned: success Sample: |