ngine_io.cloudstack.cs_cluster module – Manages host clusters on Apache CloudStack based clouds.
Note
This module is part of the ngine_io.cloudstack collection (version 2.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.cs_cluster
.
New in ngine_io.cloudstack 0.1.0
Synopsis
Create, update and remove clusters.
Requirements
The below requirements are needed on the host that executes this module.
python >= 2.6
cs >= 0.9.0
Parameters
Parameter |
Comments |
---|---|
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 |
|
Type of the cluster. Required if state=present Choices:
|
|
Name of virtual switch used for guest traffic in the cluster. This would override zone wide traffic label setting. |
|
Type of virtual switch used for guest traffic in the cluster. Allowed values are, vmwaresvs (for VMware standard vSwitch) and vmwaredvs (for VMware distributed vSwitch) Choices:
|
|
Name the hypervisor to be used. Required if state=present. Possible values are |
|
name of the cluster. |
|
Ovm3 native OCFS2 clustering enabled for cluster. |
|
Ovm3 native pooling enabled for cluster. |
|
Ovm3 vip to use for pool (and cluster). |
|
Password for the cluster. |
|
Name of the pod in which the cluster belongs to. |
|
Name of virtual switch used for public traffic in the cluster. This would override zone wide traffic label setting. |
|
Type of virtual switch used for public traffic in the cluster. Allowed values are, vmwaresvs (for VMware standard vSwitch) and vmwaredvs (for VMware distributed vSwitch) Choices:
|
|
State of the cluster. Choices:
|
|
URL for the cluster |
|
Username for the cluster. |
|
IP address of the VSM associated with this cluster. |
|
Password for the VSM associated with this cluster. |
|
Username for the VSM associated with this cluster. |
|
Name of the zone in which the cluster 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 cluster is present
ngine_io.cloudstack.cs_cluster:
name: kvm-cluster-01
zone: ch-zrh-ix-01
hypervisor: KVM
cluster_type: CloudManaged
- name: Ensure a cluster is disabled
ngine_io.cloudstack.cs_cluster:
name: kvm-cluster-01
zone: ch-zrh-ix-01
state: disabled
- name: Ensure a cluster is enabled
ngine_io.cloudstack.cs_cluster:
name: kvm-cluster-01
zone: ch-zrh-ix-01
state: enabled
- name: Ensure a cluster is absent
ngine_io.cloudstack.cs_cluster:
name: kvm-cluster-01
zone: ch-zrh-ix-01
state: absent
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
State of the cluster. Returned: success Sample: |
|
Type of the cluster. Returned: success Sample: |
|
The CPU overcommit ratio of the cluster. Returned: success Sample: |
|
Hypervisor of the cluster Returned: success Sample: |
|
UUID of the cluster. Returned: success Sample: |
|
Whether this cluster is managed by CloudStack. Returned: success Sample: |
|
The memory overcommit ratio of the cluster. Returned: success Sample: |
|
Name of the cluster. Returned: success Sample: |
|
Ovm3 VIP to use for pooling and/or clustering Returned: success Sample: |
|
Name of pod the cluster is in. Returned: success Sample: |
|
Name of zone the cluster is in. Returned: success Sample: |