harbor run -t scale-ai/hil-bench-swe_68-ask_humanharbor download scale-ai/hil-bench-swe_68-ask_humanPackage manager discovery assigns incorrect defaults on Red Hat family systems
The package manager fact collector does not consistently determine the correct default package manager across Fedora, Amazon Linux, and other Red Hat family systems. In some environments the reported ansible_pkg_mgr value does not match the distro-supported default, and in others the collector infers a manager when it should remain unknown.
The discovery logic should report the distro-supported default package manager for supported Red Hat family versions and configurations, while avoiding unsupported inference when the available system state is insufficient.
In some configurations, the reported package manager is incorrect or is inferred too aggressively, causing package installation and provisioning tasks to use the wrong backend.
Playbooks fail during package installation and provisioning. Users cannot rely on ansible_pkg_mgr being accurate across supported Red Hat family environments.
The collect method of PkgMgrFactCollector must always return a dictionary that includes the key 'pkg_mgr'; when no valid manager can be inferred, the value must be 'unknown'.
On Fedora systems (where 'ansible_distribution' equals 'Fedora'), the default package manager is determined by the major version:
yum.dnf5 when that is the installed default dnf-family manager.On Amazon Linux systems (where 'ansible_distribution' equals 'Amazon'), the default package manager is determined by the major version:
yum.On other Red Hat family systems (where 'ansible_os_family' equals 'RedHat' but 'ansible_distribution' is neither 'Fedora' nor 'Amazon'), the default package manager is determined by the major version:
yum.dnf.When a system uses the dnf family, the collector should determine the active default from available system binaries.
collected_facts must include keys 'ansible_distribution' and 'ansible_distribution_major_version'.
os.path.exists() must be used to check whether a binary path exists.
No new interfaces are introduced.