Skip to content

Commit 047cb55

Browse files
authored
Merge pull request #793 from stackhpc/selinux-permissive
Configure SELinux in permissive mode on RL9 hosts
2 parents 76e133a + f6ceb41 commit 047cb55

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
# Configure SELinux in permissive mode when configuring a Rocky Linux 9 host.
3+
selinux_state: "{{ 'permissive' if ansible_facts.os_family == 'RedHat' and ansible_facts.distribution_major_version == '9' else 'disabled' }}"
4+
5+
# Do NOT reboot Rocky Linux 9 hosts to apply SELinux config changes. Operators
6+
# must opt-in by changing this variable when applying host configuration. This
7+
# is to avoid automatically rebooting hosts originally deployed with SELinux
8+
# disabled and which now need to be changed to permissive.
9+
disable_selinux_do_reboot: "{{ not (ansible_facts.os_family == 'RedHat' and ansible_facts.distribution_major_version == '9') }}"
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
upgrade:
3+
- |
4+
SELinux mode is now set to permissive when configuring Rocky Linux 9 hosts,
5+
to match the default mode in the Zed release. If SELinux is disabled on
6+
these hosts, a reboot is required and will only be performed by Ansible if
7+
``disable_selinux_do_reboot`` is changed to ``true``.

0 commit comments

Comments
 (0)