summaryrefslogtreecommitdiff
path: root/lib/ansible/module_utils/facts/system/pkg_mgr.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ansible/module_utils/facts/system/pkg_mgr.py')
-rw-r--r--lib/ansible/module_utils/facts/system/pkg_mgr.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/ansible/module_utils/facts/system/pkg_mgr.py b/lib/ansible/module_utils/facts/system/pkg_mgr.py
index 704ea2014d..bca283a8aa 100644
--- a/lib/ansible/module_utils/facts/system/pkg_mgr.py
+++ b/lib/ansible/module_utils/facts/system/pkg_mgr.py
@@ -77,7 +77,10 @@ class PkgMgrFactCollector(BaseFactCollector):
if int(collected_facts['ansible_distribution_major_version']) < 23:
if self._pkg_mgr_exists('yum'):
pkg_mgr_name = 'yum'
-
+ elif int(collected_facts['ansible_distribution_major_version']) >= 39:
+ # /usr/bin/dnf is planned to be a symlink to /usr/bin/dnf5
+ if self._pkg_mgr_exists('dnf'):
+ pkg_mgr_name = 'dnf5'
else:
if self._pkg_mgr_exists('dnf'):
pkg_mgr_name = 'dnf'