1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00
community.general/test/units
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
..
cli Don't ask for password confirm on 'ansible-vault edit' (#30514) 2017-09-19 17:39:51 -04:00
contrib Update vmware_inventory (#26308) 2017-07-18 07:20:23 -04:00
errors test/: PEP8 compliancy (#24803) 2017-05-30 18:05:19 +01:00
executor Ansible Config part2 (#27448) 2017-08-15 16:38:59 -04:00
inventory INI inventory plugin: add documentation about variable types (#25798) 2017-07-13 12:04:20 -07:00
inventory_test_data/group_vars Merge branch 'v2_final' into devel_switch_v2 2015-05-28 15:26:03 -05:00
mock Fix dangerous default args. (#29839) 2017-09-12 00:11:13 -07:00
module_utils Fix 'distribution' fact for ArchLinux (#30723) 2017-09-25 15:00:31 -04:00
modules Fix nxos provider transport warning issue (#30610) 2017-09-22 10:32:25 +05:30
parsing Enable more pylint rules and fix reported issues. (#30539) 2017-09-18 23:20:32 -07:00
playbook less confusing 'args' message (#29053) 2017-09-06 18:20:06 -04:00
plugins Enable more pylint rules and fix reported issues. (#30543) 2017-09-19 00:45:35 -07:00
template template: fix KeyError: 'undefined variable: 0 (#27972) 2017-08-09 18:50:53 -04:00
utils test/: PEP8 compliancy (#24803) 2017-05-30 18:05:19 +01:00
vars Miscellaneous pylint fixes. 2017-09-13 01:53:08 -07:00
__init__.py Add empty-init code-smell script. (#18406) 2016-11-07 15:02:13 -08:00
conftest.py Fix bugs in ansible-test units command. (#24044) 2017-04-27 11:21:11 +08:00
test_constants.py 1st part of ansible config, adds ansible-config to view/manage configs (#12797) 2017-06-14 11:08:34 -04:00