From 3d6f13c94e2ffa4d83d9b86830bd2618d8d6fd1c Mon Sep 17 00:00:00 2001 From: Rene Mewissen Date: Thu, 22 Oct 2026 18:46:03 +0200 Subject: [PATCH] nameserver: always deploy pdns-recursor config and restart on change The recursor config template used 'force: no', so an already-present /etc/powerdns/recursor.d/010-custom.conf was never updated. Hosts that had a stale file were missing 'forward-zones-recurse = universe.local=...', which breaks resolution of internal names (e.g. step-ca.universe.local). Remove force: no so the template is always applied, and add a restart_pdns_recursor handler notified on config change. --- roles/nameserver/handlers/main.yml | 5 +++++ roles/nameserver/tasks/install_powerdns_recursor.yml | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/roles/nameserver/handlers/main.yml b/roles/nameserver/handlers/main.yml index bbfd24a..acdc1e8 100755 --- a/roles/nameserver/handlers/main.yml +++ b/roles/nameserver/handlers/main.yml @@ -18,6 +18,11 @@ name: "pdns" state: restarted +- name: restart_pdns_recursor + service: + name: "pdns-recursor" + state: restarted + - name: restart_mysqld service: name: "mysqld" diff --git a/roles/nameserver/tasks/install_powerdns_recursor.yml b/roles/nameserver/tasks/install_powerdns_recursor.yml index 396f7f7..b0391be 100755 --- a/roles/nameserver/tasks/install_powerdns_recursor.yml +++ b/roles/nameserver/tasks/install_powerdns_recursor.yml @@ -10,7 +10,7 @@ mode: "0644" owner: "root" group: "root" - force: no + notify: restart_pdns_recursor - name: nameserver | powerdns-recursor | disable unbound service: