community.vmware.vmware_drs_group – Creates vm/host group in a given cluster.¶
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_drs_group
.
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.7
PyVmomi
Parameters¶
Examples¶
---
- name: "Create DRS VM group"
delegate_to: localhost
community.vmware.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
community.vmware.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
community.vmware.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:
Authors¶
Karsten Kaj Jakobsen (@karstenjakobsen)