Ansible.K3sCluster/playbook.yml
djpbessems db77f08a20
Some checks failed
continuous-integration/drone/push Build is failing
Add OVF properties;Fix network mapping
2022-04-18 23:08:48 +02:00

37 lines
1.4 KiB
YAML

- hosts: localhost
gather_facts: false
vars_files:
- hypervisor.vcenter.yml
- cluster.k3s.yml
tasks:
- name: Deploy VMs from OVF-template
# community.vmware.vmware_guest:
community.vmware.vmware_deploy_ovf:
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)[-5:] | upper }}"
datastore: "{{ hv.datastore }}"
disk_provisioning: thin
networks:
"LAN": "{{ hv.network }}"
power_on: yes
ovf: "https://{{ repo_username }}:{{ repo_password }}@sn.itch.fyi/Repository/rel/Ubuntu-Server-20.04.ova"
deployment_option: "{{ image.deployment_option }}"
properties:
guestinfo.hostname: "{{ kubernetes.clustername | upper }}_{{ (item.ip | checksum)[-5:] | upper }}"
guestinfo.rootpw: "{{ root_password }}"
guestinfo.rootsshkey: "foo"
guestinfo.ntpserver: 127.0.0.1
guestinfo.ipaddress: "{{ item.ip | ansible.utils.ipaddr('address')
guestinfo.prefixlength: ""
guestinfo.dnsserver: 127.0.0.1
guestinfo.gateway: 127.0.0.1
# customization_spec: "{{ customization_spec }}"
delegate_to: localhost
with_items: "{{ servers }}"