New in version 2.2.
parameter | required | default | choices | comments |
---|---|---|---|---|
description |
no |
The description to give to the VLAN.
|
||
name |
yes |
The VLAN to manage. If the special VLAN
ALL is specified with the state value of absent then all VLANs will be removed. |
||
password |
yes |
The password for the user account used to connect to the BIG-IP. This option can be omitted if the environment variable
F5_PASSWORD is set. |
||
server |
yes |
The BIG-IP host. This option can be omitted if the environment variable
F5_SERVER is set. |
||
server_port (added in 2.2) |
no | 443 |
The BIG-IP server port. This option can be omitted if the environment variable
F5_SERVER_PORT is set. |
|
state |
no | present |
|
The state of the VLAN on the system. When
present , guarantees that the VLAN exists with the provided attributes. When absent , removes the VLAN from the system. |
tag |
no |
Tag number for the VLAN. The tag number can be any integer between 1 and 4094. The system automatically assigns a tag number if you do not specify a value.
|
||
tagged_interfaces |
no |
Specifies a list of tagged interfaces and trunks that you want to configure for the VLAN. Use tagged interfaces or trunks when you want to assign a single interface or trunk to multiple VLANs.
aliases: tagged_interface
|
||
untagged_interfaces |
no |
Specifies a list of untagged interfaces and trunks that you want to configure for the VLAN.
aliases: untagged_interface
|
||
user |
yes |
The username to connect to the BIG-IP with. This user must have administrative privileges on the device. This option can be omitted if the environment variable
F5_USER is set. |
||
validate_certs (added in 2.0) |
no | True |
|
If
no , SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. This option can be omitted if the environment variable F5_VALIDATE_CERTS is set. |
- name: Create VLAN bigip_vlan: name: "net1" password: "secret" server: "lb.mydomain.com" user: "admin" validate_certs: "no" delegate_to: localhost - name: Set VLAN tag bigip_vlan: name: "net1" password: "secret" server: "lb.mydomain.com" tag: "2345" user: "admin" validate_certs: "no" delegate_to: localhost - name: Add VLAN 2345 as tagged to interface 1.1 bigip_vlan: tagged_interface: 1.1 name: "net1" password: "secret" server: "lb.mydomain.com" tag: "2345" user: "admin" validate_certs: "no" delegate_to: localhost - name: Add VLAN 1234 as tagged to interfaces 1.1 and 1.2 bigip_vlan: tagged_interfaces: - 1.1 - 1.2 name: "net1" password: "secret" server: "lb.mydomain.com" tag: "1234" user: "admin" validate_certs: "no" delegate_to: localhost
Common return values are documented here Return Values, the following are the fields unique to this module:
name | description | returned | type | sample |
---|---|---|---|---|
description |
The description set on the VLAN
|
changed | string | foo VLAN |
interfaces |
Interfaces that the VLAN is assigned to
|
changed | list | ['1.1', '1.2'] |
name |
The name of the VLAN
|
changed | string | net1 |
partition |
The partition that the VLAN was created on
|
changed | string | Common |
tag |
The ID of the VLAN
|
changed | int | 2345 |
Note
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.