community.general/lib/ansible/module_utils/facts/system
Adrian Likins 3eab636b3f Fix 'distribution' fact for ArchLinux (#30723)
* Fix 'distribution' fact for ArchLinux

Allow empty wasn't breaking out of the process_dist_files
loop, so a empty /etc/arch-release would continue searching
and eventually try /etc/os-release. The os-release parsing
works, but the distro name there is 'Arch Linux' which does
not match the 2.3 behavior of 'Archlinux'

Add a OS_RELEASE_ALIAS map for the cases where we need to get
the distro name from os-release but use an alias.

We can't include 'Archlinux' in SEARCH_STRING because a name match on its keys
but without a match on the content causes a fallback to using the first
whitespace seperated item from the file content as the name.
For os-release, that is in form 'NAME=Arch Linux'

With os-release returning the right name, this also supports the
case where there is no /etc/arch-release, but there is a /etc/os-release

Fixes #30600

* pep8 and comment cleanup
2017-09-25 15:00:31 -04:00
..
__init__.py Facts Refresh (2.4 roadmap) (#23012) 2017-06-01 11:17:49 -04:00
apparmor.py Facts Refresh (2.4 roadmap) (#23012) 2017-06-01 11:17:49 -04:00
caps.py Facts Refresh (2.4 roadmap) (#23012) 2017-06-01 11:17:49 -04:00
chroot.py start of 'is chroot' fact 2017-09-18 16:16:41 -04:00
cmdline.py Cmdline fact uefi 23647 (#25446) 2017-06-08 16:03:29 -04:00
date_time.py Facts Refresh (2.4 roadmap) (#23012) 2017-06-01 11:17:49 -04:00
distribution.py Fix 'distribution' fact for ArchLinux (#30723) 2017-09-25 15:00:31 -04:00
dns.py Facts Refresh (2.4 roadmap) (#23012) 2017-06-01 11:17:49 -04:00
env.py Facts Refresh (2.4 roadmap) (#23012) 2017-06-01 11:17:49 -04:00
fips.py Facts Refresh (2.4 roadmap) (#23012) 2017-06-01 11:17:49 -04:00
local.py Facts Refresh (2.4 roadmap) (#23012) 2017-06-01 11:17:49 -04:00
lsb.py Facts Refresh (2.4 roadmap) (#23012) 2017-06-01 11:17:49 -04:00
pkg_mgr.py Fix pkg_mgr fact on OpenBSD (#30725) 2017-09-22 14:22:05 -04:00
platform.py Facts Refresh (2.4 roadmap) (#23012) 2017-06-01 11:17:49 -04:00
python.py Facts Refresh (2.4 roadmap) (#23012) 2017-06-01 11:17:49 -04:00
selinux.py Facts Refresh (2.4 roadmap) (#23012) 2017-06-01 11:17:49 -04:00
service_mgr.py Make ServiceMgrFactCollector.is_systemd_managed() a static method (#25316) 2017-06-05 09:39:05 -04:00
ssh_pub_keys.py Facts Refresh (2.4 roadmap) (#23012) 2017-06-01 11:17:49 -04:00
user.py Facts Refresh (2.4 roadmap) (#23012) 2017-06-01 11:17:49 -04:00