ngine_io.cloudstack.vpc_private_gateway module – Manages private gateways for VPCs on Apache CloudStack based clouds.
Note
This module is part of the ngine_io.cloudstack collection (version 3.3.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.vpc_private_gateway.
New in ngine_io.cloudstack 3.1.0
Synopsis
Create and remove private gateways attached to a VPC.
Existing private gateways are matched by IP address within the VPC scope.
Requirements
The below requirements are needed on the host that executes this module.
python >= 2.6
cs >= 0.9.0
Parameters
Parameter |
Comments |
|---|---|
Account the private gateway is related to. |
|
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 |
|
Whether to bypass VLAN overlap checks during creation. Choices:
|
|
Domain the private gateway is related to. |
|
Gateway of the private gateway. Required on state=present. |
|
IP address of the private gateway. |
|
Netmask of the private gateway. Required on state=present. |
|
Name of the isolated network this private gateway is associated with. |
|
Name of the network ACL to attach to the private gateway. |
|
Network offering to use for the private gateway network connection. |
|
Name of the physical network the private gateway belongs to. |
|
Poll async jobs until job has finished. Choices:
|
|
Name of the project the private gateway is related to. |
|
Whether source NAT should be enabled on the private gateway. Choices:
|
|
State of the private gateway. Choices:
|
|
If If not given, the This should only be used on personally controlled sites using self-signed certificates. Choices:
|
|
VLAN identifier or URI of the private gateway. Required on state=present. |
|
Name of the VPC. |
|
Name of the zone the VPC belongs to. |
Notes
Note
A detailed guide about cloudstack modules can be found in the CloudStack Cloud Guide.
This module supports check mode.
Examples
- name: Ensure a private gateway is present on a VPC
ngine_io.cloudstack.vpc_private_gateway:
vpc: my-vpc
zone: zone01
ip_address: 10.11.11.2
gateway: 10.11.11.1
netmask: 255.255.255.0
vlan: "400"
- name: Ensure a private gateway is absent from a VPC
ngine_io.cloudstack.vpc_private_gateway:
vpc: my-vpc
zone: zone01
ip_address: 10.11.11.2
state: absent
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
|---|---|
Account the private gateway is related to. Returned: when available Sample: |
|
Domain the private gateway is related to. Returned: when available Sample: |
|
Gateway of the private gateway. Returned: success Sample: |
|
UUID of the private gateway. Returned: success Sample: |
|
IP address of the private gateway. Returned: success Sample: |
|
Netmask of the private gateway. Returned: success Sample: |
|
Name of the ACL associated with the private gateway. Returned: when available Sample: |
|
UUID of the ACL associated with the private gateway. Returned: when available Sample: |
|
Name of the project the private gateway is related to. Returned: when available Sample: |
|
Whether source NAT is supported on the private gateway. Returned: success Sample: |
|
State of the private gateway. Returned: success Sample: |
|
VLAN identifier or URI of the private gateway. Returned: success Sample: |
|
Name of the VPC the private gateway belongs to. Returned: success Sample: |
|
UUID of the VPC the private gateway belongs to. Returned: success Sample: |
|
Name of the zone the private gateway belongs to. Returned: success Sample: |