Ansible.K3sCluster/playbook.yml
djpbessems d6d782b6c2
All checks were successful
continuous-integration/drone/push Build is passing
Specify hardware
2022-04-18 16:26:57 +02:00

33 lines
1014 B
YAML

- hosts: localhost
gather_facts: false
vars_files:
- hypervisor.vcenter.yml
- nodes.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 }}_{{ lookup('community.general.random_string', length=5, numbers=false, special=false) }}"
guest_id: "{{ item.guest_id }}"
hardware:
memory_mb: 8192
num_cpus: 4
disk:
- size_gb: 50
type: thin
datastore: "{{ hv.datastore }}"
cdrom:
type: iso
iso_path: "[{{ hv.isodatastore }}] {{ item.iso_path }}"
# template: "{{ item.template }}"
state: poweredon
# customization_spec: "{{ customization_spec }}"
delegate_to: localhost
with_items: "{{ servers }}"