diff --git a/20_powerdns_setup.yaml b/20_powerdns_setup.yaml index 24dec32..0ee552b 100644 --- a/20_powerdns_setup.yaml +++ b/20_powerdns_setup.yaml @@ -15,6 +15,7 @@ default-soa-content: "ns1.m4n5.nl. hostmaster.m4n5.nl. 1 3600 600 604800 1800" version-string: "anonymous" primary: true + webserver: "yes" pdns_auth_powerdns_repo_49: apt_repo_origin: "repo.powerdns.com" apt_repo: "deb http://repo.powerdns.com/{{ ansible_distribution | lower }} {{ ansible_distribution_release | lower }}-auth-49 main" diff --git a/inventory.yaml b/inventory.yaml index 196956a..cefa36c 100644 --- a/inventory.yaml +++ b/inventory.yaml @@ -28,7 +28,8 @@ all: ssh_port: 22 vars: # nur01, oci03 - axfr_ips: "85.235.66.180, 2a03:4000:32:1ae:889d:dbff:fea1:9df7, 143.47.189.110, 2603:c022:c001:c601:7b56:9459:93ba:11b6" + # axfr_ips: "85.235.66.180, 2a03:4000:32:1ae:889d:dbff:fea1:9df7, 143.47.189.110, 2603:c022:c001:c601:7b56:9459:93ba:11b6" + axfr_ips: "85.235.66.180, 143.47.189.110" children: master_nameservers: @@ -41,3 +42,6 @@ all: nsid: ns2 srv03.oci.mziesel.nl: nsid: ns3 + ansible_pbx: + hosts: + srv01.nur.mziesel.nl: diff --git a/util-playbooks/force_notify_slaves.yaml b/util-playbooks/force_notify_slaves.yaml new file mode 100644 index 0000000..8dc116e --- /dev/null +++ b/util-playbooks/force_notify_slaves.yaml @@ -0,0 +1,23 @@ +--- +- name: "Send notify to all slaves for all domains" + hosts: master_nameservers + become: true + tasks: + - name: List all zones + ansible.builtin.command: pdnsutil list-all-zones + register: zones_output + changed_when: false + + - name: Notify each zone + ansible.builtin.command: pdns_control notify {{ item }} + loop: "{{ zones_output.stdout_lines }}" + when: zones_output.stdout_lines | length > 0 + changed_when: true +- name: "Refresh all zones knot" + hosts: slave_nameservers + become: true + tasks: + - name: List all zones + ansible.builtin.command: knotc zone-retransfer + register: retransfer_output + changed_when: retransfer_output.rc == 0