ansible/test/units
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
2019-03-11 15:16:43 -07:00
..
cli Fix trackback on providing arguemnt --all to ansible-doc command (#52034) 2019-02-22 10:44:19 -08:00
config Fix another corner case of too many warnings for world readable current working directory 2018-08-23 20:23:59 -07:00
contrib
errors
executor Fix unittests for always adding basic to the AnsiBallZ zips 2018-08-24 15:37:13 -07:00
inventory_test_data/group_vars
mock AnsiballZ improvements 2018-07-26 20:07:25 -07:00
module_utils [stable-2.7] Ensure Clear Linux parsing is actually parsing a Clear Linux host and all others fall back to NA (#53298) (#53541) 2019-03-11 15:16:43 -07:00
modules [stable-2.7] FTD HTTP Api plugin bug fixes (#47747) (#48982) 2018-11-22 07:24:55 -08:00
parsing [stable-2.7] Support nested JSON decoding in AnsibleJSONDecoder (#45924) 2018-10-09 10:55:16 -07:00
playbook [stable-2.7] Do not use mutable defaults in FieldAttribute, instead allow supplying a callable for defaults of mutable types. Fixes #46824 (#46833). 2018-10-12 10:38:38 -07:00
plugins [stable-2.7] Disallow use of remote home directories containing .. in their path (CVE-2019-3828) (#52133) (#52173) 2019-02-13 09:23:06 -08:00
template Native Jinja2: raise undefined error immediately (#52237) 2019-02-18 08:31:26 -08:00
utils [aws unit test utils] only create a recordings directory when the env var is set (#45752) 2018-09-19 13:28:00 -07:00
vars Don't use copy.deepcopy in high workload areas, use naive_deepcopy (#44337) 2018-08-20 15:08:29 -05:00
__init__.py
ansible.cfg
conftest.py Run unit tests in parallel. (#45812) 2018-10-09 18:25:24 -07:00
test_constants.py