2021-11-02 14:07:34 +00:00
|
|
|
---
|
|
|
|
- name: Install libselinux-python
|
|
|
|
package: name=libselinux-python state=present
|
|
|
|
when:
|
2022-01-26 15:17:28 +00:00
|
|
|
- ansible_facts['os_family'] == 'RedHat'
|
|
|
|
- ansible_facts['distribution_major_version'] <= '7'
|
2021-11-02 14:07:34 +00:00
|
|
|
|
|
|
|
- name: Install python3-libselinux
|
|
|
|
package: name=python3-libselinux state=present
|
|
|
|
when:
|
2022-01-26 15:17:28 +00:00
|
|
|
- ansible_facts['os_family'] == 'RedHat'
|
2023-11-30 18:12:23 +00:00
|
|
|
- ansible_facts['distribution_major_version'] >= '8'
|
2021-11-02 14:07:34 +00:00
|
|
|
|
|
|
|
- name: 'Set selinux state'
|
|
|
|
selinux:
|
|
|
|
policy: "{{ selinux_policy }}"
|
|
|
|
state: "{{ selinux_state }}"
|
|
|
|
notify: Reboot
|