From cfffd1d7821a64fbe5ece25b01162fb60dbd76ee Mon Sep 17 00:00:00 2001 From: "Dustin C. Hatch" Date: Sun, 14 Aug 2022 19:39:02 -0500 Subject: [PATCH] collectd: Only configure SELinux when used The `selinux_permissive` module fails on hosts that do not have SELinux activated. We must skip running this task on those machines to avoid fatal errors. --- collectd.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/collectd.yml b/collectd.yml index a79c59b..a94725a 100644 --- a/collectd.yml +++ b/collectd.yml @@ -30,6 +30,7 @@ selinux_permissive: domain: collectd_t permissive: '{{ collectd_selinux_permissive|d(false) }}' + when: ansible_selinux.status == 'enabled' tags: - selinux - name: ensure collectd is running