ngine_io.cloudstack.cs_cluster – Manages host clusters on Apache CloudStack based clouds.
Note
This plugin is part of the ngine_io.cloudstack collection (version 2.2.2).
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_cluster
.
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 |
---|---|
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 |
|
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: “Enabled” |
|
Type of the cluster. Returned: success Sample: “ExternalManaged” |
|
The CPU overcommit ratio of the cluster. Returned: success Sample: 1.0 |
|
Hypervisor of the cluster Returned: success Sample: “VMware” |
|
UUID of the cluster. Returned: success Sample: “04589590-ac63-4ffc-93f5-b698b8ac38b6” |
|
Whether this cluster is managed by CloudStack. Returned: success Sample: “Managed” |
|
The memory overcommit ratio of the cluster. Returned: success Sample: 1.0 |
|
Name of the cluster. Returned: success Sample: “cluster01” |
|
Ovm3 VIP to use for pooling and/or clustering Returned: success Sample: “10.10.10.101” |
|
Name of pod the cluster is in. Returned: success Sample: “pod01” |
|
Name of zone the cluster is in. Returned: success Sample: “ch-gva-2” |
Authors
René Moser (@resmo)