make selinux check only for rhel distribution

os_family on Fedora:
ok: [localhost] => {
    "ansible_os_family": "RedHat"

Change-Id: I031f0d9325de218aac92782cd20c85e84e56758b
This commit is contained in:
Mathieu Bultel 2020-11-09 15:47:30 +01:00
parent fe2d98ed6e
commit a83cc5199e
1 changed files with 2 additions and 0 deletions

View File

@ -4,6 +4,8 @@
become: true
register: sestatus
changed_when: false
when:
- "ansible_os_family == 'RedHat'"
- name: Fail if SELinux is not in Enforced mode (RHEL)
fail: