Skip to content

Commit

Permalink
forcing pdns reload directly instead of waiting for refresh
Browse files Browse the repository at this point in the history
Signed-off-by: Fabian Arrotin <arrfab@centos.org>
  • Loading branch information
arrfab committed Dec 9, 2021
1 parent 21c8338 commit f21c6d8
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions adhoc-node-pdns-modify.yml
Expand Up @@ -6,16 +6,25 @@
- name: "target"
prompt: "Host to modify in PowerDNS ? => "
private: no
- name: "action"
- name: "pdns_action"
prompt: "Action (enable|disable) ? => "
private: no
become: True
strategy: linear
gather_facts: False

tasks:
- name: Enable/Disable msync node in PowerDNS geoip backend
shell:
cmd: /var/lib/centos-infra/host-modify -a "{{ action }}" -n "{{ target }}"
cmd: /var/lib/centos-infra/host-modify -a "{{ pdns_action }}" -n "{{ target }}"
chdir: /var/lib/centos-infra
delegate_to: "{{ zabbix_api_srv }}"

- name: Reloading directly powerdns zone on pdns nodes
command:
cmd: /var/lib/centos-pdns/backend_download
delegate_to: "{{ item }}"
with_items: "{{ groups['pdns-nodes'] }}"
tags:
- pdns

0 comments on commit f21c6d8

Please sign in to comment.