From 25f374f3a885efcd4a836788e8e8267f08ef046b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=B6rg=20Sachse?= <Joerg.Sachse@slub-dresden.de>
Date: Tue, 2 Aug 2022 09:05:33 +0200
Subject: [PATCH] fix: don't try to disable the glances.service unit on RHEL 7,
 because the installed Glances package is too old to contain SystemD-specific
 files

---
 tasks/main.yml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tasks/main.yml b/tasks/main.yml
index 5a005a4..9592c73 100644
--- a/tasks/main.yml
+++ b/tasks/main.yml
@@ -137,6 +137,7 @@
 
 - name: Glances-Server abschalten
   import_tasks: configure_glances.yml
+  when: ansible_distribution != "RedHat"        # RHEL 7 still runs Glances 2.5, which doesn't come with the glances.service SystemD unit
   tags: [glances]
 
 ### CGROUP FÜR CHECK_MK KONFIGURIEREN ###
-- 
GitLab