Fix `ansible_pkg_mgr` incorrect in TencentOS Server Linux (#81336)

Signed-off-by: denisecheng <denisecheng@tencent.com>
Co-authored-by: denisecheng <denisecheng@tencent.com>
pull/81347/head
denisecheng 2 years ago committed by GitHub
parent c8bc393871
commit cd13812e32
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -0,0 +1,2 @@
bugfixes:
- pkg_mgr.py - Fix `ansible_pkg_mgr` incorrect in TencentOS Server Linux

@ -93,6 +93,7 @@ class PkgMgrFactCollector(BaseFactCollector):
if (
(collected_facts['ansible_distribution'] == 'Fedora' and distro_major_ver < 23)
or (collected_facts['ansible_distribution'] == 'Amazon' and distro_major_ver < 2022)
or (collected_facts['ansible_distribution'] == 'TencentOS' and distro_major_ver < 3)
or distro_major_ver < 8 # assume RHEL or a clone
) and any(pm for pm in PKG_MGRS if pm['name'] == 'yum' and os.path.exists(pm['path'])):
pkg_mgr_name = 'yum'

Loading…
Cancel
Save