SELinux is a kernel-level policy mechanisms.
Alternatively, this can be done during the installation.
SELINUX=disabled
- name: Disable SELinux
selinux:
state: disabled
- name: Reboot required for selinux
when: selinux is changed
fail:
- msg: "selinux has changed, you should reboot the server first"
then reboot
reboot
With an ansible playbook
tasks:
- name: enable selinux
command: /sbin/setenforce 1