From a270aad58eacc196b504ca9f21d7519dccc325be Mon Sep 17 00:00:00 2001 From: Julian Rother Date: Tue, 17 Oct 2023 23:30:23 +0200 Subject: [PATCH] Bookworm compatibility Disables security update notifications. In Bookworm PowerDNS fails to start with security update notifications enabled. Adds special handling of config value "omit" for setting new config options in a backwards-compatible way. --- defaults/main.yml | 5 +++-- templates/pdns.conf.j2 | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/defaults/main.yml b/defaults/main.yml index 4749f1b..54ab1c6 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -12,13 +12,14 @@ powerdns: "include-dir": "/etc/powerdns/pdns.d" "launch": bind: {} - "master": "no" + "master": "no" # deprecated in 4.5.x, renamed to "primary" in newer versions "resolver": 127.0.0.1 "reuseport": "yes" "setgid": pdns "setuid": pdns - "slave": "no" + "slave": "no" # deprecated in 4.5.x, renamed to "secondary" in newer versions "version-string": "1" + "security-poll-suffix": "" zonemeta: {} zonemeta_defaults: type: native diff --git a/templates/pdns.conf.j2 b/templates/pdns.conf.j2 index a2cd7f2..bb7901e 100644 --- a/templates/pdns.conf.j2 +++ b/templates/pdns.conf.j2 @@ -1,6 +1,6 @@ {% set array_values = ['allow-axfr-ips'] %} {% set dict_array_values = ['launch'] %} -{% for option in powerdns.config.keys()|sort %} +{% for option in powerdns.config.keys()|sort if powerdns.config[option] != omit %} {{ 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 %}