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.5.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 ngine_io.cloudstack.
You need further requirements to be able to use this module,
see Requirements for details.
To use it in a playbook, specify: ngine_io.cloudstack.cs_vlan_ip_range.
New in ngine_io.cloudstack 0.1.0
Synopsis
- Create and delete VLAN IP range. 
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:  | |
| 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: 
 | |
| If  If not given, the  This should only be used on personally controlled sites using self-signed certificates. 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:  | |
| The CIDR of IPv6 network. Returned: if available Sample:  | |
| Domain name of the VLAN IP range. Returned: success Sample:  | |
| The end ip of the VLAN IP range. Returned: success Sample:  | |
| The end ipv6 of the VLAN IP range. Returned: if available Sample:  | |
| Whether VLAN IP range is dedicated to system vms or not. Returned: success Sample:  | |
| Whether VLAN IP range is of Virtual type or not. Returned: success Sample:  | |
| IPv4 gateway. Returned: success Sample:  | |
| IPv6 gateway. Returned: if available Sample:  | |
| UUID of the VLAN IP range. Returned: success Sample:  | |
| IPv4 netmask. Returned: success Sample:  | |
| The network of vlan range Returned: if available Sample:  | |
| The physical network VLAN IP range belongs to. Returned: success Sample:  | |
| Project who owns the network. Returned: if available Sample:  | |
| The start ip of the VLAN IP range. Returned: success Sample:  | |
| The start ipv6 of the VLAN IP range. Returned: if available Sample:  | |
| The ID or VID of the VLAN. Returned: success Sample:  | |
| Name of zone. Returned: success Sample:  | 
