From 84c1d63776d579d070627d828f375ffa44f33c18 Mon Sep 17 00:00:00 2001 From: Georg Pfuetzenreuter Date: Sun, 29 Jan 2023 17:38:29 +0100 Subject: [PATCH] Allow IPv6-only interfaces + fixup - interfaces with no IPv4 address would cause a render failure - repair if-clause needed for interfaces with only IPv4 addresses Signed-off-by: Georg Pfuetzenreuter --- pillar/global/map.jinja | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pillar/global/map.jinja b/pillar/global/map.jinja index b5d15dc..c0fff69 100644 --- a/pillar/global/map.jinja +++ b/pillar/global/map.jinja @@ -18,6 +18,7 @@ {%- if minion in interfaces -%}{%- for interface, ifconfig in interfaces[minion].items() -%} {%- if not interface.startswith(excluded_interfaces) -%} +{%- if 'inet' in ifconfig -%} {%- for inetconf in ifconfig['inet'] -%} {%- set ip4 = inetconf['address'] -%} @@ -42,8 +43,9 @@ {%- endif %} {%- endfor %} +{%- endif %} -{%- if 'inet6' in interface -%} +{%- if 'inet6' in ifconfig -%} {%- for inet6conf in ifconfig['inet6'] -%} {%- set ip6 = inet6conf['address'] -%}