ansible / ansible.builtin / v2.5.11 / module / cs_cluster Manages host clusters on Apache CloudStack based clouds. | "added in version" 2.1 of ansible.builtin" Authors: René Moser (@resmo) stableinterface | supported by communityansible.builtin.cs_cluster (v2.5.11) — module
pip
Install with pip install ansible==2.5.11
Create, update and remove clusters.
# Ensure a cluster is present - local_action: module: cs_cluster name: kvm-cluster-01 zone: ch-zrh-ix-01 hypervisor: KVM cluster_type: CloudManaged
# Ensure a cluster is disabled - local_action: module: cs_cluster name: kvm-cluster-01 zone: ch-zrh-ix-01 state: disabled
# Ensure a cluster is enabled - local_action: module: cs_cluster name: kvm-cluster-01 zone: ch-zrh-ix-01 state: enabled
# Ensure a cluster is absent - local_action: module: cs_cluster name: kvm-cluster-01 zone: ch-zrh-ix-01 state: absent
pod: default: null description: - Name of the pod in which the cluster belongs to. required: false url: default: null description: - URL for the cluster required: false name: description: - name of the cluster. required: true zone: default: null description: - Name of the zone in which the cluster belongs to. - If not set, default zone is used. required: false state: choices: - present - absent - disabled - enabled default: present description: - State of the cluster. required: false api_key: description: - API key of the CloudStack API. - If not given, the C(CLOUDSTACK_KEY) env variable is considered. required: true type: str api_url: description: - URL of the CloudStack API e.g. https://cloud.example.com/client/api. - If not given, the C(CLOUDSTACK_ENDPOINT) env variable is considered. required: true type: str ovm3_vip: default: null description: - Ovm3 vip to use for pool (and cluster). required: false password: default: null description: - Password for the cluster. required: false username: default: null description: - Username for the cluster. required: false ovm3_pool: default: null description: - Ovm3 native pooling enabled for cluster. required: false api_secret: description: - Secret key of the CloudStack API. - If not set, the C(CLOUDSTACK_SECRET) env variable is considered. required: true type: str hypervisor: choices: - KVM - VMware - BareMetal - XenServer - LXC - HyperV - UCS - OVM default: none description: - Name the hypervisor to be used. - Required if C(state=present). required: false api_timeout: default: 10 description: - HTTP timeout in seconds. - If not given, the C(CLOUDSTACK_TIMEOUT) env variable is considered. type: int cluster_type: choices: - CloudManaged - ExternalManaged default: null description: - Type of the cluster. - Required if C(state=present) required: false ovm3_cluster: default: null description: - Ovm3 native OCFS2 clustering enabled for cluster. required: false vms_password: default: null description: - Password for the VSM associated with this cluster. required: false vms_username: default: null description: - Username for the VSM associated with this cluster. required: false vms_ip_address: default: null description: - IP address of the VSM associated with this cluster. required: false api_http_method: choices: - get - post default: get description: - HTTP method used to query the API endpoint. - If not given, the C(CLOUDSTACK_METHOD) env variable is considered. type: str guest_vswitch_name: default: null description: - Name of virtual switch used for guest traffic in the cluster. - This would override zone wide traffic label setting. required: false guest_vswitch_type: choices: - vmwaresvs - vmwaredvs default: null description: - 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) required: false api_verify_ssl_cert: description: - Verify CA authority cert file. - If not given, the C(CLOUDSTACK_VERIFY) env variable is considered. type: str public_vswitch_name: default: null description: - Name of virtual switch used for public traffic in the cluster. - This would override zone wide traffic label setting. required: false public_vswitch_type: choices: - vmwaresvs - vmwaredvs default: null description: - 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) required: false
allocation_state: description: State of the cluster. returned: success sample: Enabled type: string cluster_type: description: Type of the cluster. returned: success sample: ExternalManaged type: string cpu_overcommit_ratio: description: The CPU overcommit ratio of the cluster. returned: success sample: 1.0 type: string hypervisor: description: Hypervisor of the cluster returned: success sample: VMware type: string id: description: UUID of the cluster. returned: success sample: 04589590-ac63-4ffc-93f5-b698b8ac38b6 type: string managed_state: description: Whether this cluster is managed by CloudStack. returned: success sample: Managed type: string memory_overcommit_ratio: description: The memory overcommit ratio of the cluster. returned: success sample: 1.0 type: string name: description: Name of the cluster. returned: success sample: cluster01 type: string ovm3_vip: description: Ovm3 VIP to use for pooling and/or clustering returned: success sample: 10.10.10.101 type: string pod: description: Name of pod the cluster is in. returned: success sample: pod01 type: string zone: description: Name of zone the cluster is in. returned: success sample: ch-gva-2 type: string