community.general/lib/ansible/module_utils/facts
Adrian Likins 65393e4747 Fix ansible_distribution on Ubuntu 10.04 (#31108)
The /etc/os-release based distro detection doesn't
seem to work for Ubuntu 10.04 (no /etc/os-release?).

So it was testing the next case which was /etc/lsb-release to
see if it is 'Mandriva'. Since the check for existence of
(/etc/lsb-release, Mandrive) was the first non-empty dist
file match, 'ansible_distribution' was being set to 'Mandriva'
expecting to be corrected by the data from the dist file content.

But since the dist file parsing for Mandriva didn't match for
Ubuntu 10.04 /etc/lsb-release _and_ there is no Debian specific
lsb-release check, 'ansible_distribution' stayed at 'Mandriva'
and the dist file checking loop keeps going and eventually off
the end of the list before finding a better match.

Adding a debian/ubuntu specific check for /etc/lsb-release after
the debian os-release sets the info correctly and stops further
checking of dist files.

Fixes #30693
2017-10-03 15:32:33 -04:00
..
hardware facts: fix SPARC cpu count on linux (#30261) 2017-09-22 14:48:00 -04:00
network Support NetBSD 7.1+ style ifconfig -a output (#25442) 2017-06-08 17:09:22 -04:00
other Facts Refresh (2.4 roadmap) (#23012) 2017-06-01 11:17:49 -04:00
system Fix ansible_distribution on Ubuntu 10.04 (#31108) 2017-10-03 15:32:33 -04:00
virtual Fix ansible_virtualization_role fact on CloudLinux (#27191) 2017-08-30 12:25:57 -04:00
__init__.py Add 2.0-2.3 facts api compat (ansible_facts(), get_all_facts()) (#27294) 2017-08-01 12:51:33 -04:00
ansible_collector.py Mv AnsibleFactCollector back to module_utils (#26150) 2017-07-11 10:44:22 -04:00
collector.py Fix fact failures cause by ordering of collectors (#30777) 2017-09-28 10:36:22 -04:00
compat.py Add 2.0-2.3 facts api compat (ansible_facts(), get_all_facts()) (#27294) 2017-08-01 12:51:33 -04:00
default_collectors.py Fix fact failures cause by ordering of collectors (#30777) 2017-09-28 10:36:22 -04:00
namespace.py Facts Refresh (2.4 roadmap) (#23012) 2017-06-01 11:17:49 -04:00
sysctl.py Facts Refresh (2.4 roadmap) (#23012) 2017-06-01 11:17:49 -04:00
timeout.py Facts Refresh (2.4 roadmap) (#23012) 2017-06-01 11:17:49 -04:00
utils.py More statvfs info for mount facts rebase 12073 (#25454) 2017-06-13 15:31:41 -04:00