Allow IPv6-only interfaces + fixup
All checks were successful
ci/lysergic/push/pipeline Pipeline was successful

- 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>
This commit is contained in:
Georg Pfuetzenreuter 2023-01-29 17:38:29 +01:00
parent 824baf386b
commit 84c1d63776
Signed by: Georg
GPG Key ID: 1ED2F138E7E6FF57

View File

@ -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'] -%}