feat: Support address lists with shared keys in configuration

- Extend function template to iterate over address lists
- Enable multiple addresses to use the same key
This commit is contained in:
Daniel Akulenok
2022-10-03 12:26:42 +02:00
committed by Daniel Akulenok
parent 96bf462521
commit 986a6843e9

View File

@@ -10,11 +10,18 @@
{% for item in dict %}
{% if item is not mapping %}
{{ item -}};
{% else %}
{% elif item.address is string %}
{{ item.address -}}
{{- (' port ' + item.port | string) if item.port is defined -}}
{{- (' key ' + item.key | string) if item.key is defined -}}
{{- (' tls ' + item.tls | string) if item.tls is defined -}};
{% elif item.address is sequence %}
{% for address in item.address %}
{{ address -}}
{{- (' port ' + item.port | string) if item.port is defined -}}
{{- (' key ' + item.key | string) if item.key is defined -}}
{{- (' tls ' + item.tls | string) if item.tls is defined -}};
{% endfor %}
{% endif %}
{% endfor %}
{% endfilter %}