summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeorg Pfuetzenreuter2023-01-29 17:38:29 +0100
committerGeorg Pfuetzenreuter2023-01-29 17:38:29 +0100
commit84c1d63776d579d070627d828f375ffa44f33c18 (patch)
tree445a2472199637741b03e766b3f9204c26618cfb
parent824baf386b006c289fe2c8ab9453504ec9859b8d (diff)
downloadsalt-84c1d63776d579d070627d828f375ffa44f33c18.tar.gz
salt-84c1d63776d579d070627d828f375ffa44f33c18.tar.bz2
salt-84c1d63776d579d070627d828f375ffa44f33c18.zip
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 <mail@georg-pfuetzenreuter.net>
-rw-r--r--pillar/global/map.jinja4
1 files changed, 3 insertions, 1 deletions
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'] -%}