tls demacro

This commit is contained in:
Daniel Akulenok
2024-05-14 14:30:18 +02:00
parent 0809bc7e91
commit 807077f78c
2 changed files with 2 additions and 6 deletions

View File

@@ -46,11 +46,9 @@ options {
{% endif %} {% endif %}
{% if item.statistics_channels is defined and item.statistics_channels %} {% if item.statistics_channels is defined and item.statistics_channels %}
{% include 'named.conf.statistics-channels.j2' %} {% include 'named.conf.statistics-channels.j2' %}
{{ statistics_channels(item.statistics_channels) }}
{% endif %} {% endif %}
{% if item.tls is defined and item.tls %} {% if item.tls is defined and item.tls %}
{% from 'named.conf.tls.j2' import tls with context %} {% include 'named.conf.tls.j2' %}
{{ tls(item.tls) }}
{% endif %} {% endif %}
{% if item.trust_anchors is defined and item.trust_anchors %} {% if item.trust_anchors is defined and item.trust_anchors %}
{% from 'named.conf.trust-anchors.j2' import trust_anchors with context %} {% from 'named.conf.trust-anchors.j2' import trust_anchors with context %}

View File

@@ -1,5 +1,4 @@
{% macro tls(tlss) %} {% for tls in item.tls if item.tls is iterable %}
{% for tls in tlss if tlss is iterable %}
tls {{ tls.name }} { tls {{ tls.name }} {
{% filter indent(bind9_config_indent, true) %} {% filter indent(bind9_config_indent, true) %}
{{ ('cert-file "' + tls.cert_file + '";\n') if tls.cert_file is defined and tls.cert_file -}} {{ ('cert-file "' + tls.cert_file + '";\n') if tls.cert_file is defined and tls.cert_file -}}
@@ -13,4 +12,3 @@ tls {{ tls.name }} {
{{ (functions.boolean_option('session-tickets', tls.session_tickets) + '\n') if tls.session_tickets is defined -}} {{ (functions.boolean_option('session-tickets', tls.session_tickets) + '\n') if tls.session_tickets is defined -}}
{% endfilter %}}; {% endfilter %}};
{% endfor %} {% endfor %}
{% endmacro %}