Skip to content

Commit 0f6aa3e

Browse files
committed
selinux checks
1 parent d66a8d6 commit 0f6aa3e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

tasks/configure-selinux.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,16 @@
44
name: policycoreutils-python, setools
55
state: present
66

7+
- name: "(Install: SELinux) Check for SELinux enabled"
8+
msg: "You need to enable selinux, if it was disabled you need to reboot"
9+
when: ansible_selinux is not defined
10+
711
- name: "(Install: SELinux) Permissive SELinux"
812
selinux:
913
state: permissive
1014
policy: targeted
1115
changed_when: false
16+
when: ansible_selinux.mode == "enforcing"
1217

1318
- name: "(Install: SELinux: Booleans) Allow HTTP network connection"
1419
seboolean:
@@ -126,4 +131,4 @@
126131
state: enforcing
127132
policy: targeted
128133
changed_when: false
129-
when: app_protect_selinux_enforcing
134+
when: app_protect_selinux_enforcing and ansible_selinux.mode == "permissive"

0 commit comments

Comments
 (0)