Skip to content

Commit

Permalink
fix: dont use Yum/Rpm task when packages are already installed
Browse files Browse the repository at this point in the history
Signed-off-by: Albert van der Land <albertvanderland@gmail.com>
  • Loading branch information
avdland committed Sep 28, 2023
1 parent 58b21e1 commit b41c938
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion roles/node_exporter/tasks/selinux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@
until: _install_selinux_packages is success
retries: 5
delay: 2
when: ansible_os_family | lower == "redhat"
when:
- ansible_os_family | lower == "redhat"
- "(('libselinux-python' not in ansible_facts.packages) and ('python3-libselinux' not in ansible_facts.packages)) or
(('policycoreutils-python' not in ansible_facts.packages) and ('python3-policycoreutils' not in ansible_facts.packages))"

- name: Install selinux python packages [clearlinux]
ansible.builtin.package:
Expand Down

0 comments on commit b41c938

Please sign in to comment.