ngine_io.cloudstack.cs_vlan_ip_range module – Manages VLAN IP ranges on Apache CloudStack based clouds.
Note
This module is part of the ngine_io.cloudstack collection (version 2.2.4).
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 ngine_io.cloudstack
.
To use it in a playbook, specify: ngine_io.cloudstack.cs_vlan_ip_range
.
New in version 0.1.0: of ngine_io.cloudstack
Requirements
The below requirements are needed on the host that executes this module.
python >= 2.6
cs >= 0.9.0
Parameters
Parameter |
Comments |
---|---|
Account who owns the VLAN. Mutually exclusive with project. |
|
HTTP method used to query the API endpoint. If not given, the Choices:
|
|
API key of the CloudStack API. If not given, the |
|
Secret key of the CloudStack API. If not set, the |
|
HTTP timeout in seconds. If not given, the Default: 10 |
|
URL of the CloudStack API e.g. https://cloud.example.com/client/api. If not given, the |
|
Verify CA authority cert file. If not given, the |
|
The CIDR of IPv6 network, must be at least /64. |
|
Domain of the account owning the VLAN. |
|
The ending IPv4 address in the VLAN IP range. If not specified, value of start_ip is used. Only considered on create. |
|
The ending IPv6 address in the IPv6 network range. If not specified, value of start_ipv6 is used. Only considered on create. |
|
Choices:
|
|
If set to Choices:
|
|
The gateway of the VLAN IP range. Required if state=present. |
|
The gateway of the IPv6 network. Only considered on create. |
|
The netmask of the VLAN IP range. Required if state=present. |
|
The network name or id. Required if for_virtual_network and physical_network are not set. |
|
The physical network name or id. |
|
Name of the pod. |
|
Project who owns the VLAN. Mutually exclusive with account. |
|
The beginning IPv4 address in the VLAN IP range. Only considered on create. |
|
The beginning IPv6 address in the IPv6 network range. Only considered on create. |
|
State of the network ip range. Choices:
|
|
The ID or VID of the network. If not specified, will be defaulted to the vlan of the network. |
|
The Zone ID of the VLAN IP range. |
Notes
Note
A detailed guide about cloudstack modules can be found in the CloudStack Cloud Guide.
This module supports check mode.
Examples
- name: create a VLAN IP range for network test
ngine_io.cloudstack.cs_vlan_ip_range:
network: test
vlan: 98
start_ip: 10.2.4.10
end_ip: 10.2.4.100
gateway: 10.2.4.1
netmask: 255.255.255.0
zone: zone-02
- name: remove a VLAN IP range for network test
ngine_io.cloudstack.cs_vlan_ip_range:
state: absent
network: test
start_ip: 10.2.4.10
end_ip: 10.2.4.100
zone: zone-02
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
Account who owns the network. Returned: if available Sample: “example account” |
|
The CIDR of IPv6 network. Returned: if available Sample: “2001:db8::/64” |
|
Domain name of the VLAN IP range. Returned: success Sample: “ROOT” |
|
The end ip of the VLAN IP range. Returned: success Sample: “10.2.4.100” |
|
The end ipv6 of the VLAN IP range. Returned: if available Sample: “2001:db8::50” |
|
Whether VLAN IP range is dedicated to system vms or not. Returned: success Sample: false |
|
Whether VLAN IP range is of Virtual type or not. Returned: success Sample: false |
|
IPv4 gateway. Returned: success Sample: “10.2.4.1” |
|
IPv6 gateway. Returned: if available Sample: “2001:db8::1” |
|
UUID of the VLAN IP range. Returned: success Sample: “04589590-ac63-4ffc-93f5-b698b8ac38b6” |
|
IPv4 netmask. Returned: success Sample: “255.255.255.0” |
|
The network of vlan range Returned: if available Sample: “test” |
|
The physical network VLAN IP range belongs to. Returned: success Sample: “04589590-ac63-4ffc-93f5-b698b8ac38b6” |
|
Project who owns the network. Returned: if available Sample: “example project” |
|
The start ip of the VLAN IP range. Returned: success Sample: “10.2.4.10” |
|
The start ipv6 of the VLAN IP range. Returned: if available Sample: “2001:db8::10” |
|
The ID or VID of the VLAN. Returned: success Sample: “vlan://98” |
|
Name of zone. Returned: success Sample: “zone-02” |
Authors
David Passante (@dpassante)