Hello,
the code that fills the ‘ansible_distribution_*’ variables grew fairly complex, so I cleaned it up. This was merged to devel (for 2.2) today, see https://github.com/ansible/ansible/pull/15221
While cleaning it up I started some test cases to make refactoring the code easier, see https://github.com/ansible/ansible/pull/15420
Please check your old/rare distributions still give the same result with the new code and add (or send me) more testcases so whatever you run won’t be broken by further refactoring. So far there are ubuntu/debian/opensuse/SLES/coreos, but it would be good to have more, especially different versions of RHEL/Oracle/ec2/…
To generate test cases, there is a script in hacking/tests/gen_distribution_version_testcase.py that outputs the format needed for the tests, assuming it runs locally on the machine with working ansible.
Depending on the number of tests and input it might be an option to further simplify the code. Currently the logic is still funny and reads some files under /etc several times, depending which distribution it does or does not find.
Cheers,
Robin