Note
This plugin is part of the community.network collection (version 3.0.0).
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_vlan
.
Parameter | Choices/Defaults | Comments |
---|---|---|
link string / required | VLAN underlying link name. | |
name string / required | VLAN interface name. | |
state string |
| Create or delete Solaris/illumos VNIC. |
temporary boolean |
| Specifies that the VLAN interface is temporary. Temporary VLANs do not persist across reboots. |
vlan_id string | Default: "no" | VLAN ID value for VLAN interface. aliases: vid |
- name: Create 'vlan42' VLAN over 'bnx0' link community.network.dladm_vlan: name=vlan42 link=bnx0 vlan_id=42 state=present - name: Remove 'vlan1337' VLAN interface community.network.dladm_vlan: name=vlan1337 state=absent
Common return values are documented here, the following are the fields unique to this module:
Key | Returned | Description |
---|---|---|
link string | always | VLAN's underlying link name Sample: e100g0 |
name string | always | VLAN name Sample: vlan42 |
state string | always | state of the target Sample: present |
temporary boolean | always | specifies if operation will persist across reboots Sample: True |
vlan_id string | always | VLAN ID Sample: 42 |
© 2012–2018 Michael DeHaan
© 2018–2021 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/latest/collections/community/network/dladm_vlan_module.html