2022-04-18 10:58:57 +00:00
|
|
|
- hosts: localhost
|
|
|
|
gather_facts: false
|
|
|
|
vars_files:
|
2022-04-18 12:28:05 +00:00
|
|
|
- hypervisor.vcenter.yml
|
|
|
|
- nodes.yml
|
2022-04-18 10:58:57 +00:00
|
|
|
tasks:
|
|
|
|
- name: Clone multiple VMs from template
|
2022-04-18 12:28:05 +00:00
|
|
|
community.vmware.vmware_guest:
|
|
|
|
hostname: "{{ hv.hostname }}"
|
|
|
|
username: "{{ hv.username }}"
|
|
|
|
password: "{{ hv_password }}"
|
2022-04-18 10:58:57 +00:00
|
|
|
validate_certs: no
|
2022-04-18 12:28:05 +00:00
|
|
|
datacenter: "{{ hv.datacenter }}"
|
|
|
|
folder: "{{ hv.folder }}"
|
|
|
|
cluster: "{{ hv.cluster }}"
|
2022-04-18 10:58:57 +00:00
|
|
|
name: "{{ item.ip }}"
|
2022-04-18 12:28:05 +00:00
|
|
|
template: "{{ item.template }}"
|
2022-04-18 10:58:57 +00:00
|
|
|
state: poweredon
|
2022-04-18 12:28:05 +00:00
|
|
|
# customization_spec: "{{ customization_spec }}"
|
|
|
|
delegate_to: localhost
|
2022-04-18 10:58:57 +00:00
|
|
|
with_items: "{{ servers }}"
|