From e22c70797ce161acfa5a52521b1ef0505db4a113 Mon Sep 17 00:00:00 2001 From: L3D Date: Sat, 13 Mar 2021 01:29:27 +0100 Subject: [PATCH] try to improve by retry --- handlers/main.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/handlers/main.yml b/handlers/main.yml index 5a28d58..ef9ce1b 100644 --- a/handlers/main.yml +++ b/handlers/main.yml @@ -2,7 +2,11 @@ - name: unbound checkconf become: true ansible.builtin.command: unbound-checkconf /etc/unbound/unbound.conf - changed_when: true + retries: 5 + delay: 3 + register: result + until: result.rc == 0 + notify: systemctl restart unbound - name: systemctl restart unbound