Skip to content

Commit

Permalink
fix: add os_family conditional for yum repo
Browse files Browse the repository at this point in the history
`ansible_pkg_mgr` seems to be missing for Fedora 41, therefore the task
gets skipped and no repo is added.
  • Loading branch information
adf-patrickha committed Jan 6, 2025
1 parent 87be207 commit 118ac39
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
loop_control:
label: "{{ item.name }}"
when:
- ansible_pkg_mgr in [ "dnf", "yum" ]
- ansible_pkg_mgr in [ "dnf", "yum" ] or
ansible_facts.os_family == "RedHat"

- name: Run tasks on apt based distributions
when:
Expand Down

0 comments on commit 118ac39

Please sign in to comment.