You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ansible/test/units/module_utils
Sam Doran 091c7c46d3 [stable-2.7] Ensure Clear Linux parsing is actually parsing a Clear Linux host and all others fall back to NA (#53298) (#53541)
* [stable-2.7] Ensure Clear Linux parsing is actually parsing a Clear Linux host and all others fall back to NA (#53298)

Fixes a bug where parse_distribution_file_ClearLinux() was called on CoreOS (and probably many other distros) and it returned True since it successfully parses the distribution file. Since this file exists on many Linux distributions and they are a very similar format, add an additional check to make sure it is Clear Linux.

Change the order in which distribution files are processed so NA is last. This prevents a match on CoreOS hosts since they also have /etc/os-release and the called matching function for NA is very general and will match CoreOS.

* Add changelog

* Add unit tests

Only add tests for Clear Linux parsing since that was the cause of this issue.
(cherry picked from commit 1d91e03119)

Co-authored-by: Sam Doran <sdoran@redhat.com>

* Use different import for 2.7
7 years ago
..
aws AnsiballZ improvements 8 years ago
basic [stable-2.7] Python 2: accept both long and int for type=int (module options) (#53289) 7 years ago
cloud [cloud] Add more configurable backoff implementations to CloudRetry/AWSRetry (#27251) 9 years ago
common Provide kubernetes definition diffs in check_mode (#41471) 8 years ago
ec2 Provide kubernetes definition diffs in check_mode (#41471) 8 years ago
facts [stable-2.7] Ensure Clear Linux parsing is actually parsing a Clear Linux host and all others fall back to NA (#53298) (#53541) 7 years ago
gcp removing libcloud secrets support for legacy gcp modules (#44932) 7 years ago
json_utils Port some tests away from nose as examples (#33437) 8 years ago
net_tools Fix for updating the name in case of host record and network view and also display meaningful error in case of connection timeout (#40597) 8 years ago
network [stable-2.7] FTD HTTP Api plugin bug fixes (#47747) (#48982) 7 years ago
parsing Consolidate boolean/mk_boolean conversion functions into a single location 9 years ago
urls Fixing HTTPError case of fetch_url for Python 3 compatibility. (#45628) 7 years ago
__init__.py Add empty-init code-smell script. (#18406) 9 years ago
conftest.py AnsiballZ improvements 8 years ago
test_database.py Fix unit test parametrize order on Python 3.5. 7 years ago
test_distribution_version.py set ansible_os_family from name variable in os-release for clearlinux… (#49906) 7 years ago
test_docker_common.py docker_* modules: simplify idempotency comparisons (#47709) 7 years ago
test_known_hosts.py Fix unit test parametrize order on Python 3.5. 7 years ago
test_postgresql.py Porting tests to pytest (#33387) 8 years ago
test_text.py Porting tests to pytest (#33387) 8 years ago
test_vmware.py VMware: Fix module usages in module_utils (#49421) 7 years ago