Mario Hölscher/Ansible SElinux Enforceing

Created Thu, 16 Feb 2023 07:57:22 +0100 Modified Fri, 15 Mar 2024 15:47:22 +0000

snipset as selinux-enforceing.yaml

- hosts: all
  user: root
  become_user: root
  become: yes
  serial: 1
  tasks:
  - name: Edit SElinux-Config
    lineinfile:
       path: /etc/selinux/config
       regexp: '^SELINUX='
       line: SELINUX=enforcing
  
  - name: Reboot Host with Defaults
    reboot:
  
  - name: Wait for Host to be Available again
    wait_for_connection: