Table of Contents

Linux - secure linux (SELinux)

About

SELinux is a kernel-level policy mechanisms.

How to

Disable secure linux

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

Enforce

With an ansible playbook

tasks:
  - name: enable selinux
    command: /sbin/setenforce 1