ansible/test/units/module_utils
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
..
aws aws.core in new aws dir in module utils - module with AnsibleAWSModule class and fail_json_aws (#25780) 2017-07-11 14:01:35 -07:00
basic add custom module type validation (#27183) 2017-07-26 16:12:50 -07:00
cloud [cloud] Add more configurable backoff implementations to CloudRetry/AWSRetry (#27251) 2017-08-08 08:56:46 -04:00
ec2 AWSRetry: allow retrying on additional ClientError exceptions (#28483) 2017-08-22 15:31:20 -04:00
facts Fix pkg_mgr fact on OpenBSD (#30725) 2017-09-22 14:22:05 -04:00
gcp Fix dangerous default args. (#29839) 2017-09-12 00:11:13 -07:00
json_utils Enable more pylint rules and fix reported issues. (#30539) 2017-09-18 23:20:32 -07:00
parsing Consolidate boolean/mk_boolean conversion functions into a single location 2017-07-17 11:48:05 -07:00
__init__.py Add empty-init code-smell script. (#18406) 2016-11-07 15:02:13 -08:00
test_aci.py Clean up ACI error text (#30501) 2017-09-18 11:51:58 -07:00
test_basic.py Fix fallback and boolean check in argspec (#27994) 2017-08-10 12:10:18 -07:00
test_database.py Revert "Update galaxy and database unit tests." 2017-02-09 15:19:01 -08:00
test_distribution_version.py Fix 'distribution' fact for ArchLinux (#30723) 2017-09-25 15:00:31 -04:00
test_known_hosts.py test/: PEP8 compliancy (#24803) 2017-05-30 18:05:19 +01:00
test_network_common.py adds new filter plugins for network use cases (#27695) 2017-08-04 07:47:12 -04:00
test_postgresql.py test/: PEP8 compliancy (#24803) 2017-05-30 18:05:19 +01:00
test_text.py test/: PEP8 compliancy (#24803) 2017-05-30 18:05:19 +01:00