community.general/lib/ansible/module_utils/facts
Adam Miller 562ff66a98 Fix pkg_mgr_name fact finding for Fedora (#40922)
* Properly handle default package manager vs apt

For distros where apt might be installed but is not the default
package manager for the distro, properly identify the default distro
package manager during fact finding and re-use fact finding from
DistributionFactCollector and instead of reimplementing small
portions of it in PkgMgrFactCollector

Add unit test to always check the apt + Fedora combination to test
the new code.

Fixes #34014

Signed-off-by: Adam Miller <admiller@redhat.com>

* remove q debugging output I accidentally left behind

Signed-off-by: Adam Miller <admiller@redhat.com>

* add os_family to the conditional so we're only hitting that code path when needed

Signed-off-by: Adam Miller <admiller@redhat.com>

* setup for a _check* pattern for general os_family group pkg_mgr checking

Signed-off-by: Adam Miller <admiller@redhat.com>

* use Mock.patch decorator for os.path.exists in TestPkgMgrFactsAptFedora

Signed-off-by: Adam Miller <admiller@redhat.com>
2018-07-23 10:56:09 -04:00
..
hardware setting LANG, LC_ALL and LC_NUMERIC to C (#41544) 2018-06-15 17:55:54 +05:30
network change OS X to macOS (#41294) 2018-06-26 14:09:23 -04:00
other Facts Refresh (2.4 roadmap) (#23012) 2017-06-01 11:17:49 -04:00
system Fix pkg_mgr_name fact finding for Fedora (#40922) 2018-07-23 10:56:09 -04:00
virtual Fix unset ansible_virtualization_role (#39514) 2018-05-08 23:39:38 +05:30
__init__.py Relicense fact code I wrote to 2 clause BSD 2017-10-19 10:38:39 -07:00
ansible_collector.py Fix fact deps when 'filter=ansible_fact' is used. (#33441) 2018-01-20 15:07:27 -05:00
collector.py Fact collector ordering deps (#31362) 2018-01-22 18:23:40 -05:00
compat.py Add fact to obtain iSCSI initiator IQN 2018-03-13 17:39:53 -07:00
default_collectors.py Add fact to obtain iSCSI initiator IQN 2018-03-13 17:39:53 -07:00
namespace.py Relicense fact code I wrote to 2 clause BSD 2017-10-19 10:38:39 -07:00
sysctl.py Fix invalid string escape sequences. 2017-11-21 10:03:34 -08:00
timeout.py Facts Refresh (2.4 roadmap) (#23012) 2017-06-01 11:17:49 -04:00
utils.py made missing cli tools non fatal (#37194) 2018-04-10 17:23:29 -04:00