From f920cdf9963484543e584f01f39ddf19875c1109 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=B6rg=20Sachse?= <Joerg.Sachse@slub-dresden.de>
Date: Fri, 21 Jan 2022 07:10:19 +0100
Subject: [PATCH] refactor: delete all legacy Check_MK plugins in one task

---
 tasks/install_checkmk_plugins.yml | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/tasks/install_checkmk_plugins.yml b/tasks/install_checkmk_plugins.yml
index ca3292c..300d95f 100644
--- a/tasks/install_checkmk_plugins.yml
+++ b/tasks/install_checkmk_plugins.yml
@@ -1,8 +1,11 @@
 ---
-- name: delete legacy plugins
+- name: delete legacy Check_MK plugins
   file:
-    path: "/usr/lib/check_mk_agent/plugins/checkmk_dsmcad.sh"
+    path: "/usr/lib/check_mk_agent/plugins/{{ item }}"
     state: absent
+  loop:
+    - "checkmk_dsmcad.sh"
+    - "mk_logwatch"
 
 - name: install self-developed Check_MK plugins
   copy:
@@ -57,8 +60,3 @@
   import_tasks: "oracle/install_checkmk_plugins_oracle.yml"
   when: ( ansible_hostname is search("rosora") ) or
         ( ansible_hostname is search("rosettaora") )
-
-- name: remove legacy Check_MK plugin
-  file:
-    path: "/usr/lib/check_mk_agent/plugins/mk_inventory"
-    state: absent
-- 
GitLab