--- - name: restart PowerDNS service: name: "{{ pdns_service_name }}" state: restarted sleep: 1 # the sleep is needed to make sure the service has been when: not pdns_disable_handlers # correctly started after being stopped during restarts - name: reload systemd and restart PowerDNS command: systemctl daemon-reload notify: restart PowerDNS when: not pdns_disable_handlers