From 07b7636d0f44f260b11d97fb7393e6cb51e1212a Mon Sep 17 00:00:00 2001 From: djpbessems Date: Mon, 18 Apr 2022 23:12:30 +0200 Subject: [PATCH] Fix syntax;Add prefixlength --- playbook.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/playbook.yml b/playbook.yml index 09ae343..256078b 100644 --- a/playbook.yml +++ b/playbook.yml @@ -27,8 +27,8 @@ guestinfo.rootpw: "{{ root_password }}" guestinfo.rootsshkey: "foo" guestinfo.ntpserver: 127.0.0.1 - guestinfo.ipaddress: "{{ item.ip | ansible.utils.ipaddr('address') - guestinfo.prefixlength: "" + guestinfo.ipaddress: "{{ item.ip | ansible.utils.ipaddr('address') }}" + guestinfo.prefixlength: "{{ (item.ip | split('/'))[-1] }}" guestinfo.dnsserver: 127.0.0.1 guestinfo.gateway: 127.0.0.1 # customization_spec: "{{ customization_spec }}"