community.general.dimensiondata_vlan module – Manage a VLAN in a Cloud Control network domain
Note
This module is part of the community.general collection (version 10.1.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.general
.
To use it in a playbook, specify: community.general.dimensiondata_vlan
.
Synopsis
Manage VLANs in Cloud Control network domains.
Parameters
Parameter |
Comments |
---|---|
Permit expansion of the target VLAN’s network if the module parameters specify a larger network than the VLAN currently possesses. If This is intended to prevent accidental expansion of a VLAN’s network (since this operation is not reversible). Choices:
|
|
A description of the VLAN. Default: |
|
The target datacenter. |
|
The password used to authenticate to the CloudControl API. If not specified, will fall back to Required if |
|
The username used to authenticate to the CloudControl API. If not specified, will fall back to |
|
The name of the target VLAN. |
|
The Id or name of the target network domain. |
|
The base address for the VLAN’s IPv4 network (e.g. 192.168.1.0). Default: |
|
The size of the IPv4 address space, e.g 24. Required, if Default: |
|
The target region. Regions are defined in Apache libcloud project [libcloud/common/dimensiondata.py]. They are also listed in https://libcloud.readthedocs.io/en/latest/compute/drivers/dimensiondata.html. Note that the default value The module prepends Default: |
|
The desired state for the target VLAN.
Choices:
|
|
If This should only be used on private instances of the CloudControl API that use self-signed certificates. Choices:
|
|
Should we wait for the task to complete before moving onto the next. Choices:
|
|
The amount of time (in seconds) to wait between checks for task completion. Only applicable if Default: |
|
The maximum amount of time (in seconds) to wait for the task to complete. Only applicable if Default: |
Attributes
Attribute |
Support |
Description |
---|---|---|
Support: none |
Can run in |
|
Support: none |
Will return details on what has changed (or possibly needs changing in |
Examples
- name: Add or update VLAN
community.general.dimensiondata_vlan:
region: na
location: NA5
network_domain: test_network
name: my_vlan1
description: A test VLAN
private_ipv4_base_address: 192.168.23.0
private_ipv4_prefix_size: 24
state: present
wait: true
- name: Read / get VLAN details
community.general.dimensiondata_vlan:
region: na
location: NA5
network_domain: test_network
name: my_vlan1
state: readonly
wait: true
- name: Delete a VLAN
community.general.dimensiondata_vlan:
region: na
location: NA5
network_domain: test_network
name: my_vlan_1
state: absent
wait: true
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
Dictionary describing the VLAN. Returned: On success when |
|
VLAN description. Returned: success Sample: |
|
VLAN ID. Returned: success Sample: |
|
Datacenter location. Returned: success Sample: |
|
VLAN name. Returned: success Sample: |
|
The base address for the VLAN’s private IPV4 network. Returned: success Sample: |
|
The gateway address for the VLAN’s private IPV4 network. Returned: success Sample: |
|
The prefix size for the VLAN’s private IPV4 network. Returned: success Sample: |
|
The base address for the VLAN’s IPV6 network. Returned: success Sample: |
|
The gateway address for the VLAN’s IPV6 network. Returned: success Sample: |
|
The prefix size for the VLAN’s IPV6 network. Returned: success Sample: |
|
VLAN status. Returned: success Sample: |