dns/bind: fix slave zone templating (#2193)

This commit is contained in:
Michael
2021-01-20 18:36:53 +01:00
committed by GitHub
parent 9fad7f2f77
commit 6c20cd0054
3 changed files with 6 additions and 2 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
PLUGIN_NAME= bind
PLUGIN_VERSION= 1.15
PLUGIN_VERSION= 1.16
PLUGIN_COMMENT= BIND domain name service
PLUGIN_DEPENDS= bind916
PLUGIN_MAINTAINER= m.muenz@gmail.com
+4
View File
@@ -8,6 +8,10 @@ necessary for asking and answering name service questions.
Plugin Changelog
================
1.16
* Fix slave zone templating
1.15
* Add support for "Transfer Source [IP|IPv6]" options
@@ -120,7 +120,7 @@ zone "rpzbing" { type master; file "/usr/local/etc/namedb/master/bing.db"; notif
{% if domain.enabled == '1' %}
{% set allow_transfer = helpers.getUUID(domain.allowtransfer) %}
{% set allow_query = helpers.getUUID(domain.allowquery) %}
zone "{{ domain.domainname }}" { type {{ domain.type }}; {% if domain.type == 'slave' %}masters { {{ domain.masterip }}; }; {% if domain.allownotifyslave != '' %} allow-notify { {{ domain.allownotifyslave.replace(',', '; ') }}; };{% endif %} file "/usr/local/etc/namedb/slave/{{ domain.domainname }}.db"; {% else %}file "/usr/local/etc/namedb/master/{{ domain.domainname }}.db"; {% endif %}{% if domain.allowtransfer is defined %} allow-transfer { {{ allow_transfer.name }}; };{% endif %}{% if domain.allowquery is defined %} allow-query { {{ allow_query.name }}; };{% endif %} };
zone "{{ domain.domainname }}" { type {{ domain.type }}; {% if domain.type == 'slave' %}masters { {{ domain.masterip }}; }; {% if domain.allownotifyslave is defined %} allow-notify { {{ domain.allownotifyslave.replace(',', '; ') }}; };{% endif %} file "/usr/local/etc/namedb/slave/{{ domain.domainname }}.db"; {% else %}file "/usr/local/etc/namedb/master/{{ domain.domainname }}.db"; {% endif %}{% if domain.allowtransfer is defined %} allow-transfer { {{ allow_transfer.name }}; };{% endif %}{% if domain.allowquery is defined %} allow-query { {{ allow_query.name }}; };{% endif %} };
{% endif %}
{% endfor %}
{% endif %}