1
0
mirror of https://pagure.io/fedora-qa/os-autoinst-distri-fedora.git synced 2025-08-18 21:35:45 +00:00

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>
This commit is contained in:
Adam Williamson 2025-03-04 11:19:08 -08:00
parent 10a5429ea8
commit c2e1960eee
3 changed files with 22 additions and 0 deletions

16
ci/dnf-dependency.yaml Normal file
View File

@ -0,0 +1,16 @@
# 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"

View File

@ -1,5 +1,8 @@
- hosts: all
tasks:
- name: Include dnf dependency workaround task
ansible.builtin.include_tasks:
file: dnf-dependency.yaml
- name: Install required packages
package:
name: ['os-autoinst', 'perl-Test-Strict', 'perl-Test-Harness', 'perl-JSON', 'perl-REST-Client', 'perl-Code-TidyAll']

View File

@ -1,5 +1,8 @@
- hosts: all
tasks:
- name: Include dnf dependency workaround task
ansible.builtin.include_tasks:
file: dnf-dependency.yaml
- name: Ensure tox is installed
include_role:
name: ensure-tox