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.
26 lines
640 B
YAML
Executable File
26 lines
640 B
YAML
Executable File
- name: nameserver | powerdns-recursor | install packages
|
|
package:
|
|
name: "{{ powerdns_recursor_package }}"
|
|
state: present
|
|
|
|
- name: nameserver | powerdns-recursor | copy config
|
|
template:
|
|
src: "powerdns-recursor-custom-config.j2"
|
|
dest: "/etc/powerdns/recursor.d/010-custom.conf"
|
|
mode: "0644"
|
|
owner: "root"
|
|
group: "root"
|
|
notify: restart_pdns_recursor
|
|
|
|
- name: nameserver | powerdns-recursor | disable unbound
|
|
service:
|
|
name: "unbound"
|
|
state: stopped
|
|
enabled: False
|
|
|
|
- name: nameserver | powerdns-recursor | enable service
|
|
service:
|
|
name: "pdns-recursor"
|
|
state: started
|
|
enabled: True
|