ngine_io.cloudstack.internal_lb_vm module – Manages internal load balancer instances 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.internal_lb_vm.
New in ngine_io.cloudstack 3.3.0
Synopsis
Start and stop the
InternalLbVmsystem instance which serves the internal load balancers of a VPC tier.The instance itself can not be created or destroyed through this API family. CloudStack deploys it automatically once the first member is assigned to an internal load balancer, see ngine_io.cloudstack.lb_internal_member.
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 internal load balancer instance 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 |
|
Domain the internal load balancer instance is related to. |
|
Whether to force stop the instance. Only considered on state=stopped. Choices:
|
|
Name of the internal load balancer instance, e.g. Mutually sufficient with network and vpc, at least one of them is required. |
|
Name of the VPC tier the internal load balancer instance serves. |
|
Poll async jobs until job has finished. Choices:
|
|
Name of the project the internal load balancer instance is related to. |
|
State of the internal load balancer instance. Choices:
|
|
If If not given, the This should only be used on personally controlled sites using self-signed certificates. Choices:
|
|
Name of the VPC the internal load balancer instance belongs to. Also scopes the network lookup. |
|
Name of the zone the internal load balancer instance is in. |
Notes
Note
This module uses admin only APIs. A regular user account gets an empty result from
listInternalLoadBalancerVMsand the module will not find the instance.There is no API to create or destroy an internal load balancer instance, so this module provides no state=present or state=absent.
When more than one instance matches, the module fails and asks for a more specific selection. Pass name to disambiguate.
A detailed guide about cloudstack modules can be found in the CloudStack Cloud Guide.
This module supports check mode.
Examples
- name: Ensure the internal load balancer instance of a tier is running
ngine_io.cloudstack.internal_lb_vm:
vpc: my-vpc
network: web-tier
zone: zone01
state: started
- name: Ensure a specific internal load balancer instance is stopped
ngine_io.cloudstack.internal_lb_vm:
name: b-1234-VM
zone: zone01
state: stopped
- name: Force stop the internal load balancer instance of a tier
ngine_io.cloudstack.internal_lb_vm:
vpc: my-vpc
network: web-tier
zone: zone01
state: stopped
force: true
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
|---|---|
Account the internal load balancer instance is related to. Returned: when available Sample: |
|
Date of the internal load balancer instance was created. Returned: when available Sample: |
|
Domain the internal load balancer instance is related to. Returned: when available Sample: |
|
Guest IP of the internal load balancer instance. Returned: when available Sample: |
|
Hostname of the host the internal load balancer instance is running on. Returned: when available Sample: |
|
UUID of the internal load balancer instance. Returned: success Sample: |
|
Name of the internal load balancer instance. Returned: success Sample: |
|
UUID of the guest network the internal load balancer instance serves. Returned: when available Sample: |
|
Name of project the internal load balancer instance is related to. Returned: when available Sample: |
|
Public IP of the internal load balancer instance. Returned: when available Sample: |
|
Whether the internal load balancer instance requires an upgrade. Returned: when available Sample: |
|
Name of the service offering of the internal load balancer instance. Returned: when available Sample: |
|
State of the internal load balancer instance. Returned: success Sample: |
|
Version of the system VM template. Returned: when available Sample: |
|
UUID of the VPC the internal load balancer instance belongs to. Returned: when available Sample: |
|
Name of zone the internal load balancer instance is in. Returned: success Sample: |