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

@ -1,6 +1,6 @@
$ORIGIN {{ item }}.
$TTL 60
@ SOA {{ dnsserver.zones[item].SOA }}
@ SOA {{ powerdns.zones[item].SOA }}
{% macro generate_records(records, scope='@') %}
{% for k, v in records.items() %}
{% if v is string %}
@ -23,4 +23,4 @@ $TTL 60
{%- endif %}
{% endfor %}
{% endmacro %}
{{ generate_records(dnsserver.zones[item]) }}
{{ generate_records(powerdns.zones[item]) }}