diff --git a/roles/alertmanager/tasks/selinux.yml b/roles/alertmanager/tasks/selinux.yml index e2d1bb9f..754cbd0a 100644 --- a/roles/alertmanager/tasks/selinux.yml +++ b/roles/alertmanager/tasks/selinux.yml @@ -1,7 +1,7 @@ --- - name: Install selinux python packages [RedHat] ansible.builtin.package: - name: "{{ ['libselinux-python', 'python-policycoreutils'] + name: "{{ ['libselinux-python', 'policycoreutils-python'] if ansible_python_version is version('3', '<') else ['python3-libselinux', 'python3-policycoreutils'] }}" state: present diff --git a/roles/prometheus/vars/main.yml b/roles/prometheus/vars/main.yml index d1701855..5748251f 100644 --- a/roles/prometheus/vars/main.yml +++ b/roles/prometheus/vars/main.yml @@ -9,6 +9,6 @@ go_arch_map: go_arch: "{{ go_arch_map[ansible_architecture] | default(ansible_architecture) }}" _prometheus_binary_install_dir: '/usr/local/bin' -_prometheus_selinux_packages: "{{ ['libselinux-python', 'python-policycoreutils'] +_prometheus_selinux_packages: "{{ ['libselinux-python', 'policycoreutils-python'] if ansible_python_version is version('3', '<') else ['python3-libselinux', 'python3-policycoreutils'] }}"