add support for multiple backends

This commit is contained in:
nd 2019-09-30 02:19:11 +02:00
parent 7b5dc1720b
commit 3a75d32472
No known key found for this signature in database
GPG key ID: 21B5CD4DEE3670E9
2 changed files with 4 additions and 3 deletions

View file

@ -10,7 +10,7 @@ powerdns:
"guardian": "yes"
"include-dir": "/etc/powerdns/pdns.d"
"launch":
- bind
bind: {}
"master": "no"
"reuseport": "yes"
"setgid": pdns

View file

@ -1,6 +1,7 @@
{% set array_values = ['allow-axfr-ips', 'launch'] %}
{% set array_values = ['allow-axfr-ips'] %}
{% set dict_array_values = ['launch'] %}
{% for option in powerdns.config.keys()|sort %}
{{ option }}={% if option in array_values %}{{ powerdns.config[option]|join(',' ) }}{% else %}{{ powerdns.config[option] }}{% endif %}
{{ option }}={% if option in array_values %}{{ powerdns.config[option]|join(',' ) }}{% elif option in dict_array_values %}{{ powerdns.config[option].keys()|sort()|join(',' ) }}{% else %}{{ powerdns.config[option] }}{% endif %}
{% endfor %}