diff --git a/playbook.yml b/playbook.yml index 01fd867..09ae343 100644 --- a/playbook.yml +++ b/playbook.yml @@ -14,27 +14,23 @@ datacenter: "{{ hv.datacenter }}" folder: "{{ hv.folder }}" cluster: "{{ hv.cluster }}" - 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 + 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 }}" diff --git a/vars/cluster.k3s.yml b/vars/cluster.k3s.yml index ff91a5d..2c420d1 100644 --- a/vars/cluster.k3s.yml +++ b/vars/cluster.k3s.yml @@ -1,6 +1,8 @@ --- kubernetes: clustername: k3s-dev +image: + deployment_option: large servers: - ip: 192.168.11.121/24 iso_path: ISO-files/ubuntu-20.04.1-live-server-amd64.iso