Demacro item.http

This commit is contained in:
Daniel Akulenok
2024-05-14 13:47:59 +02:00
parent 87c276c55b
commit dfd93ecfea
2 changed files with 2 additions and 5 deletions

View File

@@ -30,8 +30,7 @@ options {
{% include 'named.conf.dyndb.j2' %}
{% endif %}
{% if item.http is defined and item.http %}
{% from 'named.conf.http.j2' import http with context %}
{{ http(item.http) }}
{% include 'named.conf.http.j2' %}
{% endif %}
{% if item.keylist is defined and item.keylist %}
{% from 'named.conf.key.j2' import keylist with context %}

View File

@@ -1,5 +1,4 @@
{% macro http(seq) %}
{% for http in seq if seq is iterable %}
{% for http in item.http if item.http is iterable %}
http {{ http.name }} {
{% filter indent(bind9_config_indent, true) %}
{% if http.endpoints is defined and http.endpoints %}
@@ -14,4 +13,3 @@ endpoints {
{{ ('streams-per-connection ' + http.streams_per_connection | string + ';\n') if http.streams_per_connection is defined and http.streams_per_connection -}}
{% endfilter %}};
{% endfor %}
{% endmacro %}