From ff233b65a6534445663d767cb92a7f1d08741fd7 Mon Sep 17 00:00:00 2001 From: Jeremy Lecour Date: Tue, 6 Feb 2024 08:39:38 +0100 Subject: [PATCH] remove check-mode protection for handlers handlers are not supposed to be executed in check-mode since no change should happen in check-mode. If there is a corner case we should deal with it at the source, not at the handler level. --- filebeat/handlers/main.yml | 1 - nginx/handlers/main.yml | 3 --- 2 files changed, 4 deletions(-) diff --git a/filebeat/handlers/main.yml b/filebeat/handlers/main.yml index 8456ee33..c5f7001f 100644 --- a/filebeat/handlers/main.yml +++ b/filebeat/handlers/main.yml @@ -4,4 +4,3 @@ ansible.builtin.systemd: name: filebeat state: restarted - when: not ansible_check_mode diff --git a/nginx/handlers/main.yml b/nginx/handlers/main.yml index af2cabf0..bdd5f477 100644 --- a/nginx/handlers/main.yml +++ b/nginx/handlers/main.yml @@ -3,16 +3,13 @@ ansible.builtin.service: name: nginx state: restarted - when: not ansible_check_mode - name: reload nginx ansible.builtin.service: name: nginx state: reloaded - when: not ansible_check_mode - name: restart munin ansible.builtin.service: name: munin-node state: restarted - when: not ansible_check_mode