diff --git a/templates/named.conf.functions.j2 b/templates/named.conf.functions.j2 index 7b89025..0ba8399 100644 --- a/templates/named.conf.functions.j2 +++ b/templates/named.conf.functions.j2 @@ -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 %}