community.vmware.vmware_datastore_cluster – Manage VMware vSphere datastore clusters¶
Note
This plugin is part of the community.vmware collection (version 1.7.0).
To install it use: ansible-galaxy collection install community.vmware
.
To use it in a playbook, specify: community.vmware.vmware_datastore_cluster
.
Synopsis¶
This module can be used to add and delete datastore cluster in given VMware environment.
All parameters and VMware object values are case sensitive.
Requirements¶
The below requirements are needed on the host that executes this module.
python >= 2.6
PyVmomi
Parameters¶
Examples¶
- 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
Return Values¶
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.
|
Authors¶
Abhijeet Kasurde (@Akasurde)