--- | |
# tasks file for opdk-setup-selinux-disable | |
- name: Permanently disable SELINUX | |
lineinfile: | |
dest: /etc/selinux/config | |
regexp: "^(SELINUX=)" | |
line: '\1disabled' | |
backrefs: yes | |
backup: yes | |
when: "{{ ansible_selinux.status | lower != 'disabled' }}" | |
- name: Restart playbook if selinux is running | |
debug: | |
msg: 'SELinux MUST be disabled, selinux has been updated, restarting node now...' | |
when: "{{ ansible_selinux.status | lower != 'disabled' }}" | |
notify: | |
- restart node | |
- meta: flush_handlers | |