From 8176eaf69450f50e832e062d5718410f484f6ba6 Mon Sep 17 00:00:00 2001 From: "Dustin C. Hatch" Date: Tue, 28 Jun 2022 09:47:18 -0500 Subject: [PATCH] r/collectd-prometheus: Work w/o firewalld, selinux Tasks that configure the SELinux policy obviously only make sense if the host uses SELinux. Similarly, if the host does not use FirewallD, configuring firewall rules doesn't work. --- roles/collectd-prometheus/tasks/main.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/roles/collectd-prometheus/tasks/main.yml b/roles/collectd-prometheus/tasks/main.yml index bc79ce2..d875338 100644 --- a/roles/collectd-prometheus/tasks/main.yml +++ b/roles/collectd-prometheus/tasks/main.yml @@ -21,6 +21,7 @@ dest: /var/lib/selinux/collectd-local.pp notify: - install collectd-local selinux module + when: ansible_selinux.status == 'enabled' tags: - selinux