mirror of
https://github.com/prometheus-community/ansible
synced 2024-11-26 13:50:20 +00:00
1d98aee69a
Signed-off-by: SuperQ <superq@gmail.com>
39 lines
1.4 KiB
YAML
39 lines
1.4 KiB
YAML
---
|
|
- name: Install selinux python packages [RHEL]
|
|
ansible.builtin.package:
|
|
name:
|
|
- "{{ ( (ansible_facts.distribution_major_version | int) < 8) | ternary('libselinux-python','python3-libselinux') }}"
|
|
- "{{ ( (ansible_facts.distribution_major_version | int) < 8) | ternary('policycoreutils-python','python3-policycoreutils') }}"
|
|
state: present
|
|
register: _install_selinux_packages
|
|
until: _install_selinux_packages is success
|
|
retries: 5
|
|
delay: 2
|
|
when:
|
|
- (ansible_distribution | lower == "redhat") or
|
|
(ansible_distribution | lower == "centos")
|
|
|
|
- name: Install selinux python packages [Fedora]
|
|
ansible.builtin.package:
|
|
name:
|
|
- "{{ ( (ansible_facts.distribution_major_version | int) < 29) | ternary('libselinux-python','python3-libselinux') }}"
|
|
- "{{ ( (ansible_facts.distribution_major_version | int) < 29) | ternary('policycoreutils-python','python3-policycoreutils') }}"
|
|
state: present
|
|
register: _install_selinux_packages
|
|
until: _install_selinux_packages is success
|
|
retries: 5
|
|
delay: 2
|
|
|
|
when:
|
|
- ansible_distribution | lower == "fedora"
|
|
|
|
- name: Install selinux python packages [clearlinux]
|
|
ansible.builtin.package:
|
|
name: sysadmin-basic
|
|
state: present
|
|
register: _install_selinux_packages
|
|
until: _install_selinux_packages is success
|
|
retries: 5
|
|
delay: 2
|
|
when:
|
|
- ansible_distribution | lower == "clearlinux"
|