From b133dbdec344ca140516b2209fa82f25e1b0e3f4 Mon Sep 17 00:00:00 2001 From: noraab <39309050+noraab@users.noreply.github.com> Date: Wed, 23 May 2018 13:16:57 +0200 Subject: [PATCH] Fix failing role on non-SELinux RedHat (#37) [patch] Allow playbook to run on RedHat even if SELinux is not enabled. --- tasks/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tasks/main.yml b/tasks/main.yml index 722b1d9..992a396 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -91,8 +91,8 @@ setype: http_port_t state: present when: - - ansible_os_family == "RedHat" - - ansible_virtualization_type != "docker" + - ansible_version.full is version_compare('2.4', '>=') + - ansible_selinux.status == "enabled" - name: Ensure Node Exporter is enabled on boot systemd: