W3cubDocs

/Ansible

bigip_vlan - Manage VLANs on a BIG-IP system

New in version 2.2.

Synopsis

Manage VLANs on a BIG-IP system

Requirements (on host that executes module)

  • f5-sdk

Options

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.
server
yes
The BIG-IP host.
server_port
(added in 2.2)
no 443
The BIG-IP server port.
state
no present
  • absent
  • 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.
validate_certs
(added in 2.0)
no True
  • True
  • False
If no, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates.

Examples

- 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

Return Values

Common return values are documented here Common Return Values, the following are the fields unique to this module:

name description returned type sample
interfaces Interfaces that the VLAN is assigned to changed list ['1.1', '1.2']
partition The partition that the VLAN was created on changed string Common
tag The ID of the VLAN changed int 2345
description The description set on the VLAN changed string foo VLAN
name The name of the VLAN changed string net1

Notes

Note

Requires the f5-sdk Python package on the host. This is as easy as pip install f5-sdk.

Note

Requires BIG-IP versions >= 12.0.0

This is an Extras Module

For more information on what this means please read Extras Modules

For help in developing on modules, should you be so inclined, please read Community Information & Contributing, developing_test_pr and Developing Modules.

© 2012–2016 Michael DeHaan
© 2016 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/bigip_vlan_module.html