1
0
mirror of https://pagure.io/fedora-qa/os-autoinst-distri-fedora.git synced 2025-07-31 06:05:45 +00:00
os-autoinst-distri-fedora/ci/dnf-dependency.yaml
Adam Williamson c2e1960eee Fix CI for Fedora 41 (dnf 5)
See https://pagure.io/fedora-project-config/issue/340 and
https://github.com/ansible/ansible/issues/84206 . We need to
force install python3-libdnf5 or ansible can't manage packages.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2025-03-04 11:31:20 -08:00

17 lines
642 B
YAML

# See https://github.com/ansible/ansible/issues/84206 for the background on this
# When the server is on ansible >= 2.19 things should just work, but ours are
# not (RHEL 9 has 2.14, RHEL 8 has 2.15, as I write this)
- name: Ensure that python3-libdnf5 is installed
block:
- name: Check whether python3-libdnf5 is installed
ansible.builtin.command: "rpm -q python3-libdnf5"
register: p3dnf5
failed_when: "1 != 1"
changed_when: "1 != 1"
check_mode: no
- name: Install python3-libdnf5 with direct dnf command
ansible.builtin.command: "dnf -y install python3-libdnf5"
when: "p3dnf5.rc != 0"