2022-09-22 14:38:42 +00:00
|
|
|
---
|
2022-11-25 10:37:52 +00:00
|
|
|
- name: Install selinux python packages [RedHat]
|
2022-09-23 12:07:54 +00:00
|
|
|
ansible.builtin.package:
|
2022-11-25 10:37:52 +00:00
|
|
|
name: "{{ ['libselinux-python', 'python-policycoreutils']
|
|
|
|
if ansible_python_version is version('3', '<') else
|
|
|
|
['python3-libselinux', 'python3-policycoreutils'] }}"
|
2022-09-22 14:38:42 +00:00
|
|
|
state: present
|
|
|
|
register: _install_selinux_packages
|
|
|
|
until: _install_selinux_packages is success
|
|
|
|
retries: 5
|
|
|
|
delay: 2
|
2022-11-25 10:37:52 +00:00
|
|
|
when: ansible_os_family | lower == redhat
|
2022-09-22 14:38:42 +00:00
|
|
|
|
|
|
|
- name: Install selinux python packages [clearlinux]
|
2022-09-23 12:07:54 +00:00
|
|
|
ansible.builtin.package:
|
2022-09-22 14:38:42 +00:00
|
|
|
name: sysadmin-basic
|
|
|
|
state: present
|
|
|
|
register: _install_selinux_packages
|
|
|
|
until: _install_selinux_packages is success
|
|
|
|
retries: 5
|
|
|
|
delay: 2
|
|
|
|
when:
|
|
|
|
- ansible_distribution | lower == "clearlinux"
|