update pkg_mgr.py for Amazon Linux support (#56618)

pull/57163/head
Tim Hunter 5 years ago committed by Martin Krizek
parent ac1895453f
commit 4c00fc7b32

@ -0,0 +1,2 @@
bugfixes:
- pkg_mgr - Ansible 2.8.0 failing to install yum packages on Amazon Linux (https://github.com/ansible/ansible/issues/56583)

@ -78,9 +78,11 @@ class PkgMgrFactCollector(BaseFactCollector):
# If there's some new magical Fedora version in the future,
# just default to dnf
pkg_mgr_name = 'dnf'
elif collected_facts['ansible_distribution'] == 'Amazon':
pkg_mgr_name = 'yum'
else:
# If it's not Fedora and it's Red Hat family of distros, assume RHEL
# or a clone. For versions of RHEL < 8 that Ansible supports, the
# If it's not one of the above and it's Red Hat family of distros, assume
# RHEL or a clone. For versions of RHEL < 8 that Ansible supports, the
# vendor supported official package manager is 'yum' and in RHEL 8+
# (as far as we know at the time of this writing) it is 'dnf'.
# If anyone wants to force a non-official package manager then they

Loading…
Cancel
Save