Renamed vars_file;Ensure idempotency w/ random string
Some checks reported errors
continuous-integration/drone/push Build encountered an error

This commit is contained in:
Danny Bessems 2022-04-18 21:35:28 +02:00
parent c55eddc5dc
commit f2b4bfcd53
2 changed files with 5 additions and 5 deletions

View File

@ -2,7 +2,7 @@
gather_facts: false
vars_files:
- hypervisor.vcenter.yml
- nodes.yml
- cluster.k3s.yml
tasks:
- name: Clone multiple VMs from template
community.vmware.vmware_guest:
@ -13,7 +13,7 @@
datacenter: "{{ hv.datacenter }}"
folder: "{{ hv.folder }}"
cluster: "{{ hv.cluster }}"
name: "{{ kubernetes.clustername | upper }}_{{ lookup('community.general.random_string', length=5, numbers=false, special=false) | upper }}"
name: "{{ kubernetes.clustername | upper }}_{{ community.general.random(seed=item.ip, length=5, numbers=false, special=false) | upper }}"
guest_id: "{{ item.guest_id }}"
hardware:
memory_mb: 8192

View File

@ -2,12 +2,12 @@
kubernetes:
clustername: k3s-dev
servers:
- ip: 192.168.11.121
- ip: 192.168.11.121/24
iso_path: ubuntu-20.04.1-live-server-amd64.iso
guest_id: ubuntu64Guest
- ip: 192.168.11.122
- ip: 192.168.11.122/24
iso_path: ubuntu-20.04.1-live-server-amd64.iso
guest_id: ubuntu64Guest
- ip: 192.168.11.123
- ip: 192.168.11.123/24
iso_path: ubuntu-20.04.1-live-server-amd64.iso
guest_id: ubuntu64Guest