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' %} {% include 'named.conf.dyndb.j2' %}
{% endif %} {% endif %}
{% if item.http is defined and item.http %} {% if item.http is defined and item.http %}
{% from 'named.conf.http.j2' import http with context %} {% include 'named.conf.http.j2' %}
{{ http(item.http) }}
{% endif %} {% endif %}
{% if item.keylist is defined and item.keylist %} {% if item.keylist is defined and item.keylist %}
{% from 'named.conf.key.j2' import keylist with context %} {% from 'named.conf.key.j2' import keylist with context %}

View File

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