community.vmware.vmware_cluster_drs – Manage Distributed Resource Scheduler (DRS) on VMware vSphere 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_cluster_drs
.
Synopsis¶
Manages DRS on VMware vSphere clusters.
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¶
Examples¶
- name: Enable DRS
community.vmware.vmware_cluster_drs:
hostname: '{{ vcenter_hostname }}'
username: '{{ vcenter_username }}'
password: '{{ vcenter_password }}'
datacenter_name: datacenter
cluster_name: cluster
enable_drs: true
delegate_to: localhost
- name: Enable DRS and distribute a more even number of virtual machines across hosts for availability
community.vmware.vmware_cluster_drs:
hostname: '{{ vcenter_hostname }}'
username: '{{ vcenter_username }}'
password: '{{ vcenter_password }}'
datacenter_name: datacenter
cluster_name: cluster
enable_drs: true
advanced_settings:
'TryBalanceVmsPerHost': '1'
delegate_to: localhost
- name: Enable DRS and set default VM behavior to partially automated
community.vmware.vmware_cluster_drs:
hostname: "{{ vcenter_hostname }}"
username: "{{ vcenter_username }}"
password: "{{ vcenter_password }}"
datacenter_name: DC0
cluster_name: "{{ cluster_name }}"
enable_drs: True
drs_default_vm_behavior: partiallyAutomated
delegate_to: localhost
Authors¶
Joseph Callen (@jcpowermac)
Abhijeet Kasurde (@Akasurde)