From 35ed3e09f2328cfb834882c299116e20f660e2b1 Mon Sep 17 00:00:00 2001 From: s3lph Date: Fri, 5 Nov 2021 12:58:53 +0100 Subject: [PATCH] Apparently reloading knot is not enough with some config changes (e.g. listen-address), restart instead --- roles/knot/handlers/main.yml | 5 +++++ roles/knot/tasks/config.yml | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/roles/knot/handlers/main.yml b/roles/knot/handlers/main.yml index 299e65e..44462d5 100644 --- a/roles/knot/handlers/main.yml +++ b/roles/knot/handlers/main.yml @@ -4,3 +4,8 @@ service: name: knot state: reloaded + +- name: restart knot + service: + name: knot + state: restarted diff --git a/roles/knot/tasks/config.yml b/roles/knot/tasks/config.yml index d37312e..ef8eb4b 100644 --- a/roles/knot/tasks/config.yml +++ b/roles/knot/tasks/config.yml @@ -9,4 +9,4 @@ mode: 0640 vars: zones: "{{ hostvars[inventory_hostname] | dict2items | selectattr('key', 'match', '^knot_zone_.+$') | map(attribute='value') | list }}" - notify: reload knot + notify: restart knot