From dfd93ecfeabfde169b37e172ca77cbb74fda0e34 Mon Sep 17 00:00:00 2001 From: Daniel Akulenok Date: Tue, 14 May 2024 13:47:59 +0200 Subject: [PATCH] Demacro item.http --- templates/named.conf.generator.j2 | 3 +-- templates/named.conf.http.j2 | 4 +--- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/templates/named.conf.generator.j2 b/templates/named.conf.generator.j2 index 890c7c6..6fe2e62 100644 --- a/templates/named.conf.generator.j2 +++ b/templates/named.conf.generator.j2 @@ -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 %} diff --git a/templates/named.conf.http.j2 b/templates/named.conf.http.j2 index 0eacc46..6007008 100644 --- a/templates/named.conf.http.j2 +++ b/templates/named.conf.http.j2 @@ -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 %} \ No newline at end of file