New in version 2.2.
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 |
# 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
Common return values are documented here Return Values, the following are the fields unique to this module:
name | description | returned | type | sample |
---|---|---|---|---|
state | state of the target | always | string | present |
temporary | VNIC's persistence | always | boolean | True |
name | VNIC name | always | string | vnic0 |
link | VNIC underlying link name | always | string | igb0 |
vlan | VLAN to use for VNIC | success | int | 42 |
mac | MAC address to use for VNIC | if mac is specified | string | 00:00:5E:00:53:42 |
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–2017 Michael DeHaan
© 2017 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/latest/dladm_vnic_module.html