From cb3abd557431cc04aef5de1b302bcde25cd81c81 Mon Sep 17 00:00:00 2001 From: Niklas Yann Wettengel Date: Sat, 25 Mar 2017 14:33:23 +0100 Subject: added reload and restart handlers --- roles/install_bind/handlers/main.yml | 5 +++++ roles/install_bind/tasks/main.yml | 8 +------- 2 files changed, 6 insertions(+), 7 deletions(-) create mode 100644 roles/install_bind/handlers/main.yml (limited to 'roles/install_bind') diff --git a/roles/install_bind/handlers/main.yml b/roles/install_bind/handlers/main.yml new file mode 100644 index 0000000..8fb0c88 --- /dev/null +++ b/roles/install_bind/handlers/main.yml @@ -0,0 +1,5 @@ +--- +- name: reload bind + systemd: + name: named.service + state: reloaded diff --git a/roles/install_bind/tasks/main.yml b/roles/install_bind/tasks/main.yml index 31a833c..a7391e5 100644 --- a/roles/install_bind/tasks/main.yml +++ b/roles/install_bind/tasks/main.yml @@ -15,10 +15,4 @@ template: src: named.conf.j2 dest: /etc/named.conf - register: named_conf - -- name: reload bind - when: named_conf.changed - systemd: - name: named.service - state: reloaded + notify: reload bind -- cgit v1.2.3-54-g00ecf