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
|
2022-04-18 19:35:28 +00:00
|
|
|
- cluster.k3s.yml
|
2022-04-18 10:58:57 +00:00
|
|
|
tasks:
|
2022-04-18 20:49:50 +00:00
|
|
|
- name: Deploy VMs from OVF-template
|
|
|
|
# community.vmware.vmware_guest:
|
|
|
|
community.vmware.vmware_deploy_ovf:
|
2022-04-18 12:28:05 +00:00
|
|
|
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 20:49:50 +00:00
|
|
|
ovf: "https://{{ repo_username }}:{{ repo_password }}@sn.itch.fyi/Repository/rel/Ubuntu-Server-20.04.ova"
|
|
|
|
name: "{{ kubernetes.clustername | upper }}_{{ (item.ip | checksum)[-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.utils.ipaddr('address') }}"
|
|
|
|
# netmask: "{{ item.ip | ansible.utils.ipaddr('netmask') }}"
|
|
|
|
# cdrom:
|
|
|
|
# - type: iso
|
|
|
|
# iso_path: "[{{ hv.isodatastore }}] {{ item.iso_path }}"
|
|
|
|
# controller_number: 0
|
|
|
|
# unit_number: 0
|
|
|
|
# state: poweredon
|
|
|
|
power_on: yes
|
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 }}"
|