Commit 3a5a6685 by Peter Oliver Committed by Brian Coca

Consistently use "OracleLinux" in OS detection.

Previously, a mixture of "OracleLinux" and "Oracle Linux" was used,
causing the `ansible_os_family` fact not to be set to `RedHat`.

Fixes #10742.
parent 09a6c0c9
...@@ -87,7 +87,7 @@ class Facts(object): ...@@ -87,7 +87,7 @@ class Facts(object):
_I386RE = re.compile(r'i([3456]86|86pc)') _I386RE = re.compile(r'i([3456]86|86pc)')
# For the most part, we assume that platform.dist() will tell the truth. # For the most part, we assume that platform.dist() will tell the truth.
# This is the fallback to handle unknowns or exceptions # This is the fallback to handle unknowns or exceptions
OSDIST_LIST = ( ('/etc/oracle-release', 'Oracle Linux'), OSDIST_LIST = ( ('/etc/oracle-release', 'OracleLinux'),
('/etc/redhat-release', 'RedHat'), ('/etc/redhat-release', 'RedHat'),
('/etc/vmware-release', 'VMwareESX'), ('/etc/vmware-release', 'VMwareESX'),
('/etc/openwrt_release', 'OpenWrt'), ('/etc/openwrt_release', 'OpenWrt'),
...@@ -291,7 +291,7 @@ class Facts(object): ...@@ -291,7 +291,7 @@ class Facts(object):
# Once we determine the value is one of these distros # Once we determine the value is one of these distros
# we trust the values are always correct # we trust the values are always correct
break break
elif name == 'Oracle Linux': elif name == 'OracleLinux':
data = get_file_content(path) data = get_file_content(path)
if 'Oracle Linux' in data: if 'Oracle Linux' in data:
self.facts['distribution'] = name self.facts['distribution'] = name
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment