Manage VMware vSphere datastore clusters
- This module can be used to add and delete datastore cluster in given VMware environment.
- All parameters and VMware object values are case sensitive.
Note
- All modules requires API write access and hence is not supported on a free ESXi license.
- name: Create datastore cluster and enable SDRS
community.vmware.vmware_datastore_cluster:
hostname: '{{ vcenter_hostname }}'
username: '{{ vcenter_username }}'
password: '{{ vcenter_password }}'
datacenter_name: '{{ datacenter_name }}'
datastore_cluster_name: '{{ datastore_cluster_name }}'
enable_sdrs: true
state: present
delegate_to: localhost
- name: Create datastore cluster using folder
community.vmware.vmware_datastore_cluster:
hostname: '{{ vcenter_hostname }}'
username: '{{ vcenter_username }}'
password: '{{ vcenter_password }}'
folder: '/{{ datacenter_name }}/datastore/ds_folder'
datastore_cluster_name: '{{ datastore_cluster_name }}'
state: present
delegate_to: localhost
- name: Delete datastore cluster
community.vmware.vmware_datastore_cluster:
hostname: '{{ vcenter_hostname }}'
username: '{{ vcenter_username }}'
password: '{{ vcenter_password }}'
datacenter_name: '{{ datacenter_name }}'
datastore_cluster_name: '{{ datastore_cluster_name }}'
state: absent
delegate_to: localhost
Common return values are documented here, the following are the fields unique to this module:
Key | Returned | Description |
---|---|---|
result
string
|
always |
information about datastore cluster operation
Sample:
Datastore cluster 'DSC2' created successfully.
|
- Abhijeet Kasurde (@Akasurde)