Skip to content

Commit 7b48cef

Browse files
committed
Fix bug related to issue dev-sec#537
Signed-off-by: Mahdi Abbasi <mahdi.abbasi.2013@gmail.com>
1 parent 764472a commit 7b48cef

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

roles/os_hardening/tasks/hardening.yml

-1
Original file line numberDiff line numberDiff line change
@@ -115,5 +115,4 @@
115115
import_tasks: selinux.yml
116116
tags: selinux
117117
when:
118-
- ansible_facts.selinux.status == 'enabled'
119118
- os_selinux_enabled | bool

roles/os_hardening/tasks/selinux.yml

+5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
---
2+
- name: Gather the package facts
3+
package_facts:
4+
manager: auto
5+
26
- name: Configure selinux | selinux-01
37
selinux:
48
policy: "{{ os_selinux_policy }}"
59
state: "{{ os_selinux_state }}"
10+
when: "'libselinux' in ansible_facts.packages"

0 commit comments

Comments
 (0)