From 4e4e5af047489c5efa1c77bc49956a6c234a14cc Mon Sep 17 00:00:00 2001 From: Miroslav Vadkerti Date: Mar 11 2026 19:34:39 +0000 Subject: Fix str-common-pkgs role failing on systems with dnf5 ansible-core 2.16+ detects ansible_pkg_mgr as 'dnf5' on systems where dnf5 is the default package manager (Fedora 41+). The str-common-pkgs role dynamically includes pkgs-{{ pkg_mgr }}.yml, which resolves to pkgs-dnf5.yml — a file that does not exist. Map 'dnf5' back to 'dnf' since pkgs-dnf.yml uses shell commands that work identically with both dnf and dnf5. Assisted-by: Claude Code --- diff --git a/roles/str-common-pkgs/tasks/main.yml b/roles/str-common-pkgs/tasks/main.yml index 32d396e..4de3ee2 100644 --- a/roles/str-common-pkgs/tasks/main.yml +++ b/roles/str-common-pkgs/tasks/main.yml @@ -26,6 +26,7 @@ 'rpm-ostree' if (is_atomic and (ansible_pkg_mgr == 'unknown' or ansible_pkg_mgr == 'atomic_container')) + else 'dnf' if ansible_pkg_mgr == 'dnf5' else ansible_pkg_mgr }}