From a7cffb1ffb43cde5bdffcc665beeb30e90c5f444 Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Tue, 29 Oct 2019 13:07:01 +0100 Subject: [PATCH] Fixes to the powerdns configuration template needed by version 4.2. --- library/roles/powerdns-authoritative/tasks/main.yml | 12 ++++++++---- .../roles/powerdns-authoritative/templates/pdns.conf | 11 +++++++++++ 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/library/roles/powerdns-authoritative/tasks/main.yml b/library/roles/powerdns-authoritative/tasks/main.yml index f4752a72..3dde36ae 100644 --- a/library/roles/powerdns-authoritative/tasks/main.yml +++ b/library/roles/powerdns-authoritative/tasks/main.yml @@ -1,5 +1,11 @@ --- - block: + - name: Stop and disable systemd-resolved + service: name=systemd-resolved state=stopped enabled=no + when: + - ansible_distribution_major_version >= '18' + - ansible_distribution_file_variety == "Debian" + - name: Get the Powerdns repo key apt_key: url={{ powerdns_auth_repo_key }} state=present @@ -7,12 +13,10 @@ apt_repository: repo='{{ powerdns_auth_repo_data }}' state=present update_cache=yes - name: Install the powerdns packages - apt: pkg={{ item }} state=present - with_items: '{{ powerdns_auth_pkgs }}' + apt: pkg={{ powerdns_auth_pkgs }} state=present - name: Install the powerdns DB backend packages - apt: pkg={{ item }} state=present - with_items: '{{ powerdns_auth_db_pkgs }}' + apt: pkg={{ powerdns_auth_db_pkgs }} state=present when: powerdns_auth_use_db_backend - name: Install the powerdns main configuration file diff --git a/library/roles/powerdns-authoritative/templates/pdns.conf b/library/roles/powerdns-authoritative/templates/pdns.conf index 05ee0b29..9780754d 100644 --- a/library/roles/powerdns-authoritative/templates/pdns.conf +++ b/library/roles/powerdns-authoritative/templates/pdns.conf @@ -33,6 +33,12 @@ allow-notify-from={%for ip in pdns_allow_notify_from %}{{ ip }}{%if not loop.las #allow-unsigned-notify=yes allow-unsigned-notify={{ pdns_allow_unsigned_notify | default('yes') }} + +################################# +# superslave (boolean) +# +superslave={{ pdns_i_am_superslave | default('no') }} + ################################# # allow-unsigned-supermaster Allow supermasters to create zones without TSIG signed NOTIFY # @@ -69,10 +75,12 @@ api-key={{ powerdns_auth_api_key | default(omit) }} # # api-logfile=/var/log/pdns.log +{% if powerdns_auth_minor == 1 %} ################################# # api-readonly Disallow data modification through the REST API when set # api-readonly={{ powerdns_auth_api_readonly | default('no') }} +{% endif %} ################################# # axfr-lower-serial Also AXFR a zone from a master with a lower serial @@ -248,6 +256,9 @@ dnsupdate={{ powerdns_dnsupdate | default('no') }} # forward-notify IP addresses to forward received notifications to regardless of master or slave settings # # forward-notify= +{% if powerdns_forward_notify is defined %} +forward-notify={{ powerdns_forward_notify }} +{% endif %} ################################# # guardian Run within a guardian process