Fix network config;Fix illegal hostname
Some checks reported errors
continuous-integration/drone/push Build encountered an error

This commit is contained in:
Danny Bessems 2022-04-19 09:53:20 +02:00
parent 73daee6e7b
commit 3d4a0f1538
2 changed files with 10 additions and 6 deletions

View File

@ -17,7 +17,7 @@
datacenter: "{{ hv.datacenter }}" datacenter: "{{ hv.datacenter }}"
folder: "{{ hv.folder }}" folder: "{{ hv.folder }}"
cluster: "{{ hv.cluster }}" cluster: "{{ hv.cluster }}"
name: "{{ kubernetes.clustername | upper }}_{{ (item.ip | checksum)[-5:] | upper }}" name: "{{ kubernetes.clustername | upper }}-{{ (item.ip | checksum)[-5:] | upper }}"
datastore: "{{ hv.datastore }}" datastore: "{{ hv.datastore }}"
disk_provisioning: thin disk_provisioning: thin
networks: networks:
@ -26,14 +26,14 @@
ovf: /scratch/image.ova ovf: /scratch/image.ova
deployment_option: "{{ image.deployment_option }}" deployment_option: "{{ image.deployment_option }}"
properties: properties:
guestinfo.hostname: "{{ kubernetes.clustername | upper }}_{{ (item.ip | checksum)[-5:] | upper }}" guestinfo.hostname: "{{ kubernetes.clustername | upper }}-{{ (item.ip | checksum)[-5:] | upper }}"
guestinfo.rootpw: "{{ root_password }}" guestinfo.rootpw: "{{ root_password }}"
guestinfo.rootsshkey: "foo" guestinfo.rootsshkey: "foo"
guestinfo.ntpserver: 127.0.0.1 guestinfo.ntpserver: "{{ network.ntpserver }}"
guestinfo.ipaddress: "{{ item.ip | ansible.utils.ipaddr('address') }}" guestinfo.ipaddress: "{{ item.ip | ansible.utils.ipaddr('address') }}"
guestinfo.prefixlength: "{{ (item.ip | split('/'))[-1] }}" guestinfo.prefixlength: "{{ (item.ip | ansible.utils.ipaddr('prefix') }}"
guestinfo.dnsserver: 127.0.0.1 guestinfo.dnsserver: "{{ network.dnsserver }}"
guestinfo.gateway: 127.0.0.1 guestinfo.gateway: "{{ network.gateway }}"
# customization_spec: "{{ customization_spec }}" # customization_spec: "{{ customization_spec }}"
delegate_to: localhost delegate_to: localhost
with_items: "{{ servers }}" with_items: "{{ servers }}"

View File

@ -4,6 +4,10 @@ kubernetes:
image: image:
deployment_option: large deployment_option: large
ova_url: sn.itch.fyi/Repository/rel/Ubuntu-Server-20.04.ova ova_url: sn.itch.fyi/Repository/rel/Ubuntu-Server-20.04.ova
network:
ntpserver: 0.pool.ntp.org,1.pool.ntp.org,2.pool.ntp.org
dnsserver: 192.168.11.220,192.168.5.220
gateway: 192.168.11.1
servers: servers:
- ip: 192.168.11.121/24 - ip: 192.168.11.121/24
guest_id: ubuntu64Guest guest_id: ubuntu64Guest