dimensiondata_vlan - Manage a VLAN in a Cloud Control network domain.
- Manage VLANs in Cloud Control network domains.
Parameter |
Choices/Defaults |
Comments |
allow_expand
bool |
|
Permit expansion of the target VLAN's network if the module parameters specify a larger network than the VLAN currently posesses?
If False , the module will fail under these conditions.
This is intended to prevent accidental expansion of a VLAN's network (since this operation is not reversible).
|
description
|
|
A description of the VLAN.
|
location
required |
|
The target datacenter.
|
mcp_password
|
|
The password used to authenticate to the CloudControl API.
If not specified, will fall back to MCP_PASSWORD from environment variable or ~/.dimensiondata .
Required if mcp_user is specified.
|
mcp_user
|
|
The username used to authenticate to the CloudControl API.
If not specified, will fall back to MCP_USER from environment variable or ~/.dimensiondata .
|
name
|
|
The name of the target VLAN.
Required if state is present .
|
network_domain
required |
|
The Id or name of the target network domain.
|
private_ipv4_base_address
|
|
The base address for the VLAN's IPv4 network (e.g. 192.168.1.0).
|
private_ipv4_prefix_size
|
|
The size of the IPv4 address space, e.g 24.
Required, if private_ipv4_base_address is specified.
|
region
|
Choices:
- Regions are defined in Apache libcloud project [libcloud/common/dimensiondata.py]
- They are also listed in U(https://libcloud.readthedocs.io/en/latest/compute/drivers/dimensiondata.html)
- Note that the default value "na" stands for "North America".
- The module prepends 'dd-' to the region choice.
Default:
"na"
|
The target region.
|
state
|
Choices:
present ←
- absent
- readonly
|
The desired state for the target VLAN.
readonly ensures that the state is only ever read, not modified (the module will fail if the resource does not exist).
|
validate_certs
|
Default:
"yes"
|
If false , SSL certificates will not be validated.
This should only be used on private instances of the CloudControl API that use self-signed certificates.
|
wait
|
Default:
"no"
|
Should we wait for the task to complete before moving onto the next.
|
wait_poll_interval
|
Default:
2
|
The amount of time (in seconds) to wait between checks for task completion.
Only applicable if wait=true.
|
wait_time
|
Default:
600
|
The maximum amount of time (in seconds) to wait for the task to complete.
Only applicable if wait=true.
|
# Add or update VLAN
- 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: yes
# Read / get VLAN details
- dimensiondata_vlan:
region: na
location: NA5
network_domain: test_network
name: my_vlan1
state: readonly
wait: yes
# Delete a VLAN
- dimensiondata_vlan:
region: na
location: NA5
network_domain: test_network
name: my_vlan_1
state: absent
wait: yes
Common return values are documented here, the following are the fields unique to this module:
Key |
Returned |
Description |
vlan
complex
|
On success when state is 'present' |
Dictionary describing the VLAN.
|
|
status
string
|
|
VLAN status.
Sample:
NORMAL
|
|
private_ipv6_prefix_size
int
|
|
The prefix size for the VLAN's IPV6 network.
Sample:
64
|
|
private_ipv6_base_address
string
|
|
The base address for the VLAN's IPV6 network.
Sample:
2402:9900:111:1195:0:0:0:0
|
|
private_ipv4_base_address
string
|
|
The base address for the VLAN's private IPV4 network.
Sample:
192.168.23.0
|
|
name
string
|
|
VLAN name.
Sample:
My VLAN
|
|
private_ipv4_prefix_size
int
|
|
The prefix size for the VLAN's private IPV4 network.
Sample:
24
|
|
location
string
|
|
Datacenter location.
Sample:
NA3
|
|
private_ipv4_gateway_address
string
|
|
The gateway address for the VLAN's private IPV4 network.
Sample:
192.168.23.1
|
|
private_ipv6_gateway_address
string
|
|
The gateway address for the VLAN's IPV6 network.
Sample:
2402:9900:111:1195:0:0:0:1
|
|
id
string
|
|
VLAN ID.
Sample:
aaaaa000-a000-4050-a215-2808934ccccc
|
|
description
string
|
|
VLAN description.
Sample:
My VLAN description
|
This module is flagged as preview which means that it is not guaranteed to have a backwards compatible interface.
This module is flagged as community which means that it is maintained by the Ansible Community. See Module Maintenance & Support for more info.
For a list of other modules that are also maintained by the Ansible Community, see here.
Hint
If you notice any issues in this documentation you can edit this document to improve it.