dladm_vnic - Manage VNICs on Solaris/illumos systems.
New in version 2.2.
Synopsis
- Create or delete VNICs on Solaris/illumos systems.
Options
| parameter | required | default | choices | comments |
|---|---|---|---|---|
| link | yes | VNIC underlying link name. | ||
| mac | no | Sets the VNIC's MAC address. Must be valid unicast MAC address. aliases: macaddr | ||
| name | yes | VNIC name. | ||
| state | no | present |
| Create or delete Solaris/illumos VNIC. |
| temporary | no |
| Specifies that the VNIC is temporary. Temporary VNICs do not persist across reboots. | |
| vlan | 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 Return Values, the following are the fields unique to this module:
| name | description | returned | type | sample |
|---|---|---|---|---|
| link | VNIC underlying link name | always | string | igb0 |
| mac | MAC address to use for VNIC | if mac is specified | string | 00:00:5E:00:53:42 |
| name | VNIC name | always | string | vnic0 |
| state | state of the target | always | string | present |
| temporary | VNIC's persistence | always | boolean | True |
| vlan | VLAN to use for VNIC | success | int | 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_vnic_module.html