|
|
|
@ -77,7 +77,7 @@ class Facts(object):
|
|
|
|
|
# This is the fallback to handle unknowns or exceptions
|
|
|
|
|
OSDIST_DICT = { '/etc/redhat-release': 'RedHat',
|
|
|
|
|
'/etc/vmware-release': 'VMwareESX',
|
|
|
|
|
'/etc/system-release': 'Amazon' }
|
|
|
|
|
'/etc/system-release': 'OtherLinux' }
|
|
|
|
|
SELINUX_MODE_DICT = { 1: 'enforcing', 0: 'permissive', -1: 'disabled' }
|
|
|
|
|
|
|
|
|
|
# A list of dicts. If there is a platform with more than one
|
|
|
|
@ -133,10 +133,11 @@ class Facts(object):
|
|
|
|
|
if os.path.exists(path):
|
|
|
|
|
if self.facts['distribution'] == 'Fedora':
|
|
|
|
|
pass
|
|
|
|
|
elif name == 'Amazon':
|
|
|
|
|
self.facts['distribution'] = 'Amazon'
|
|
|
|
|
elif name == 'OtherLinux':
|
|
|
|
|
data = get_file_content(path)
|
|
|
|
|
self.facts['distribution_version'] = data.split()[-1]
|
|
|
|
|
if 'Amazon' in data:
|
|
|
|
|
self.facts['distribution'] = 'Amazon'
|
|
|
|
|
self.facts['distribution_version'] = data.split()[-1]
|
|
|
|
|
elif name == 'RedHat':
|
|
|
|
|
data = get_file_content(path)
|
|
|
|
|
if 'Red Hat' in data:
|
|
|
|
|