community.general/lib/ansible/module_utils/facts
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
..
hardware facts: fix SPARC cpu count on linux (#30261) 2017-09-22 14:48:00 -04:00
network Support NetBSD 7.1+ style ifconfig -a output (#25442) 2017-06-08 17:09:22 -04:00
other
system Fix 'distribution' fact for ArchLinux (#30723) 2017-09-25 15:00:31 -04:00
virtual Fix ansible_virtualization_role fact on CloudLinux (#27191) 2017-08-30 12:25:57 -04:00
__init__.py Add 2.0-2.3 facts api compat (ansible_facts(), get_all_facts()) (#27294) 2017-08-01 12:51:33 -04:00
ansible_collector.py Mv AnsibleFactCollector back to module_utils (#26150) 2017-07-11 10:44:22 -04:00
collector.py add a 'min' type for gather_subset to collect nothing (#27085) 2017-08-02 11:04:01 -04:00
compat.py Add 2.0-2.3 facts api compat (ansible_facts(), get_all_facts()) (#27294) 2017-08-01 12:51:33 -04:00
default_collectors.py Fix pkg_mgr fact on OpenBSD (#30725) 2017-09-22 14:22:05 -04:00
namespace.py
sysctl.py
timeout.py
utils.py More statvfs info for mount facts rebase 12073 (#25454) 2017-06-13 15:31:41 -04:00