From ca287d6871105e01a693836d005567dfe9927c51 Mon Sep 17 00:00:00 2001 From: nd Date: Wed, 4 Nov 2020 23:02:23 +0100 Subject: [PATCH] fixed subnetmask appending to ips --- templates/hosts.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/hosts.j2 b/templates/hosts.j2 index 3d782c6..0e0448c 100644 --- a/templates/hosts.j2 +++ b/templates/hosts.j2 @@ -5,6 +5,6 @@ ff02::2 ip6-allrouters {% for n in vm['nics']|default([]) %} {% for i in vm['nics'][n].protocol if vm['nics'][n].protocol[i].type == "static" %} -{{vm['nics'][n].protocol[i].options['address']}} {{ inventory_hostname }} {{ inventory_hostname_short }} +{{ vm['nics'][n].protocol[i].options['address'].split('/')[0] }} {{ inventory_hostname }} {{ inventory_hostname_short }} {% endfor %} {% endfor %}