From f69f631b36d97e3957902cbcc65b4e278b00b7c6 Mon Sep 17 00:00:00 2001 From: Daniel Akulenok Date: Tue, 14 May 2024 13:42:02 +0200 Subject: [PATCH] Demacro include --- templates/named.conf.generator.j2 | 3 +-- templates/named.conf.include.j2 | 4 +--- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/templates/named.conf.generator.j2 b/templates/named.conf.generator.j2 index cf262c4..3c25aa9 100644 --- a/templates/named.conf.generator.j2 +++ b/templates/named.conf.generator.j2 @@ -18,8 +18,7 @@ options { {% include 'named.conf.controls.j2' %} {% endif %} {% if item.include is defined and item.include %} -{% from 'named.conf.include.j2' import include with context %} -{{ include(item.include) }} +{% include 'named.conf.include.j2' %} {% endif %} {% if item.dlz is defined and item.dlz %} {% from 'named.conf.dlz.j2' import dlz with context %} diff --git a/templates/named.conf.include.j2 b/templates/named.conf.include.j2 index c5c6f14..9652ed6 100644 --- a/templates/named.conf.include.j2 +++ b/templates/named.conf.include.j2 @@ -1,5 +1,3 @@ -{% macro include(files) %} -{% for file in files %} +{% for file in item.include %} include "{{ file }}"; {% endfor %} -{% endmacro %} \ No newline at end of file