ansible / ansible.builtin / v2.9.27 / module / dladm_vnic Manage VNICs on Solaris/illumos systems. | "added in version" 2.2 of ansible.builtin" Authors: Adam Števko (@xen0l) preview | supported by communityansible.builtin.dladm_vnic (v2.9.27) — module
pip
Install with pip install ansible==2.9.27
Create or delete VNICs on Solaris/illumos systems.
# 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
mac: aliases: - macaddr default: false description: - Sets the VNIC's MAC address. Must be valid unicast MAC address. required: false link: description: - VNIC underlying link name. required: true name: description: - VNIC name. required: true vlan: aliases: - vlan_id default: false description: - Enable VLAN tagging for this VNIC. The VLAN tag will have id I(vlan). required: false state: choices: - present - absent default: present description: - Create or delete Solaris/illumos VNIC. required: false temporary: default: false description: - Specifies that the VNIC is temporary. Temporary VNICs do not persist across reboots. required: false type: bool
link: description: VNIC underlying link name returned: always sample: igb0 type: str mac: description: MAC address to use for VNIC returned: if mac is specified sample: 00:00:5E:00:53:42 type: str name: description: VNIC name returned: always sample: vnic0 type: str state: description: state of the target returned: always sample: present type: str temporary: description: VNIC's persistence returned: always sample: 'True' type: bool vlan: description: VLAN to use for VNIC returned: success sample: 42 type: int