djpbessems
d2dcc237d9
Some checks reported errors
continuous-integration/drone/push Build encountered an error
36 lines
1.1 KiB
YAML
36 lines
1.1 KiB
YAML
- hosts: localhost
|
|
gather_facts: false
|
|
vars_files:
|
|
- hypervisor.vcenter.yml
|
|
- cluster.k3s.yml
|
|
tasks:
|
|
- name: Clone multiple VMs from template
|
|
community.vmware.vmware_guest:
|
|
hostname: "{{ hv.hostname }}"
|
|
username: "{{ hv.username }}"
|
|
password: "{{ hv_password }}"
|
|
validate_certs: no
|
|
datacenter: "{{ hv.datacenter }}"
|
|
folder: "{{ hv.folder }}"
|
|
cluster: "{{ hv.cluster }}"
|
|
name: "{{ kubernetes.clustername | upper }}_{{ (item.ip | checksum | regex_replace('[0-9]', ''))[0..5] | upper }}"
|
|
guest_id: "{{ item.guest_id }}"
|
|
hardware:
|
|
memory_mb: 8192
|
|
num_cpus: 4
|
|
disk:
|
|
- size_gb: 50
|
|
type: thin
|
|
datastore: "{{ hv.datastore }}"
|
|
networks:
|
|
- name: "{{ hv.network }}"
|
|
ip: "{{ item.ip | ansible.netcommon.ipaddr('address') }}"
|
|
netmask: "{{ item.ip | ansible.netcommon.ipaddr('netmask') }}"
|
|
cdrom:
|
|
- type: iso
|
|
iso_path: "[{{ hv.isodatastore }}] {{ item.iso_path }}"
|
|
state: poweredon
|
|
# customization_spec: "{{ customization_spec }}"
|
|
delegate_to: localhost
|
|
with_items: "{{ servers }}"
|