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/facts
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
..
fixtures Facts Refresh (2.4 roadmap) (#23012) 9 years ago
hardware facts: fix device uuid's on el6 (#36128) 8 years ago
network Support NetBSD 7.1+ style ifconfig -a output (#25442) 9 years ago
other Facts Refresh (2.4 roadmap) (#23012) 9 years ago
system [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
__init__.py Facts Timeout was not settable via ansible.cfg 9 years ago
base.py Facts Refresh (2.4 roadmap) (#23012) 9 years ago
test_ansible_collector.py Fix pkg_mgr_name fact finding for Fedora (#40922) 8 years ago
test_collector.py Fact collector ordering deps (#31362) 8 years ago
test_collectors.py Fix pkg_mgr_name fact finding for Fedora (#40922) 8 years ago
test_facts.py facts: fix device uuid's on el6 (#36128) 8 years ago
test_timeout.py Facts Refresh (2.4 roadmap) (#23012) 9 years ago
test_utils.py More statvfs info for mount facts rebase 12073 (#25454) 9 years ago