rewrite most of this role to allow multiple backends

This commit is contained in:
nd 2019-09-22 19:04:37 +02:00
parent 144736d652
commit ca078de05c
No known key found for this signature in database
GPG key ID: 21B5CD4DEE3670E9
7 changed files with 93 additions and 574 deletions

View file

@ -0,0 +1,28 @@
options {
directory "/var/lib/powerdns/zones/";
};
{% for z in powerdns.zonemeta %}
zone "{{ z }}" IN {
type {{ powerdns.zonemeta[z].type }};
file "/var/lib/powerdns/zones/db.{{z}}";
{%if 'masters' in powerdns.zonemeta[z] %}
masters {
{{ powerdns.zonemeta[z]['masters']|join('; ') }};
};
{% endif %}
allow-query {
{{ powerdns.zonemeta[z]['allow-query']|default(['any'])|join('; ') }};
};
allow-update {
{{ powerdns.zonemeta[z]['allow-update']|default(['none'])|join('; ') }};
};
allow-transfer {
{{ powerdns.zonemeta[z]['allow-transfer']|default(['none'])|join('; ') }};
};
{%if 'notify' in powerdns.zonemeta[z] %}
notify {{ "yes" if powerdns.zonemeta[z].notify else "no" }};
{% endif %}
};
{% endfor %}