community.vmware.vmware_cluster – Manage VMware vSphere clusters¶
Note
This plugin is part of the community.vmware collection (version 1.9.0).
To install it use: ansible-galaxy collection install community.vmware
.
To use it in a playbook, specify: community.vmware.vmware_cluster
.
Synopsis¶
Adds or removes VMware vSphere clusters.
Although this module can manage DRS, HA and VSAN related configurations, this functionality is deprecated and will be removed in 2.12.
To manage DRS, HA and VSAN related configurations, use the new modules vmware_cluster_drs, vmware_cluster_ha and vmware_cluster_vsan.
All values and VMware object names are case sensitive.
Requirements¶
The below requirements are needed on the host that executes this module.
Tested on ESXi 5.5 and 6.5.
PyVmomi installed.
Parameters¶
See Also¶
See also
- community.vmware.vmware_cluster_drs
The official documentation on the community.vmware.vmware_cluster_drs module.
- community.vmware.vmware_cluster_ha
The official documentation on the community.vmware.vmware_cluster_ha module.
- community.vmware.vmware_cluster_vsan
The official documentation on the community.vmware.vmware_cluster_vsan module.
Examples¶
- name: Create Cluster
community.vmware.vmware_cluster:
hostname: '{{ vcenter_hostname }}'
username: '{{ vcenter_username }}'
password: '{{ vcenter_password }}'
datacenter_name: datacenter
cluster_name: cluster
enable_ha: true
enable_drs: true
enable_vsan: true
delegate_to: localhost
- name: Create Cluster with additional changes
community.vmware.vmware_cluster:
hostname: "{{ vcenter_hostname }}"
username: "{{ vcenter_username }}"
password: "{{ vcenter_password }}"
datacenter_name: DC0
cluster_name: "{{ cluster_name }}"
enable_ha: True
ha_vm_monitoring: vmMonitoringOnly
enable_drs: True
drs_default_vm_behavior: partiallyAutomated
enable_vsan: True
register: cl_result
delegate_to: localhost
- name: Delete Cluster
community.vmware.vmware_cluster:
hostname: "{{ vcenter_hostname }}"
username: "{{ vcenter_username }}"
password: "{{ vcenter_password }}"
datacenter_name: datacenter
cluster_name: cluster
enable_ha: true
enable_drs: true
enable_vsan: true
state: absent
delegate_to: localhost
Authors¶
Joseph Callen (@jcpowermac)
Abhijeet Kasurde (@Akasurde)