vmware_drs_group – Creates vm/host group in a given cluster¶
New in version 2.8.
Synopsis¶
This module can be used to create VM/Host groups in a given cluster. Creates a vm group if
vms
is set. Creates a host group ifhosts
is set.
Requirements¶
The below requirements are needed on the host that executes this module.
python >= 2.6
PyVmomi
Parameters¶
Examples¶
---
- name: "Create DRS VM group"
delegate_to: localhost
vmware_drs_group:
hostname: "{{ vcenter_hostname }}"
password: "{{ vcenter_password }}"
username: "{{ vcenter_username }}"
cluster_name: DC0_C0
datacenter_name: DC0
group_name: TEST_VM_01
vms:
- DC0_C0_RP0_VM0
- DC0_C0_RP0_VM1
state: present
- name: "Create DRS Host group"
delegate_to: localhost
vmware_drs_group:
hostname: "{{ vcenter_hostname }}"
password: "{{ vcenter_password }}"
username: "{{ vcenter_username }}"
cluster_name: DC0_C0
datacenter_name: DC0
group_name: TEST_HOST_01
hosts:
- DC0_C0_H0
- DC0_C0_H1
- DC0_C0_H2
state: present
- name: "Delete DRS Host group"
delegate_to: localhost
vmware_drs_group:
hostname: "{{ vcenter_hostname }}"
password: "{{ vcenter_password }}"
username: "{{ vcenter_username }}"
cluster_name: DC0_C0
datacenter_name: DC0
group_name: TEST_HOST_01
state: absent
Return Values¶
Common return values are documented here, the following are the fields unique to this module:
Status¶
This module is not guaranteed to have a backwards compatible interface. [preview]
This module is maintained by the Ansible Community. [community]
Authors¶
Karsten Kaj Jakobsen (@karstenjakobsen)
Hint
If you notice any issues in this documentation, you can edit this document to improve it.