diff --git a/playbook.yml b/playbook.yml index ee1eaca..c64dac1 100644 --- a/playbook.yml +++ b/playbook.yml @@ -13,7 +13,7 @@ datacenter: "{{ hv.datacenter }}" folder: "{{ hv.folder }}" cluster: "{{ hv.cluster }}" - name: "{{ kubernetes.clustername | upper }}_{{ community.general.random(seed=item.ip, length=5, numbers=false, special=false) | upper }}" + name: "{{ kubernetes.clustername | upper }}_{{ (item.ip | checksum | regex_replace('[0-9]', ''))[0..5] | upper }}" guest_id: "{{ item.guest_id }}" hardware: memory_mb: 8192 @@ -24,7 +24,8 @@ datastore: "{{ hv.datastore }}" networks: - name: "{{ hv.network }}" - ip: "{{ item.ip }}" + ip: "{{ item.ip | ansible.netcommon.ipaddr('address') }}" + netmask: "{{ item.ip | ansible.netcommon.ipaddr('netmask') }}" cdrom: - type: iso iso_path: "[{{ hv.isodatastore }}] {{ item.iso_path }}"