set ansible_os_family from name variable in os-release for clearlinux OS (#49639)

* set ansible_os_family from name variable in os-release for clearlinux system

Signed-off-by: Josue David Hernandez Gutierrez <josue.d.hernandez.gutierrez@intel.com>

* Add os_family for clear linux and clear linux mixes

Signed-off-by: Josue David Hernandez Gutierrez <josue.d.hernandez.gutierrez@intel.com>
pull/49799/head
Josue David Hernandez 6 years ago committed by ansibot
parent 935fa51143
commit 9202ef60b0

@ -390,6 +390,9 @@ class DistributionFiles:
release = re.search('ID=(.*)', data) release = re.search('ID=(.*)', data)
if release: if release:
clear_facts['distribution_release'] = release.groups()[0] clear_facts['distribution_release'] = release.groups()[0]
pname = re.search('NAME="(.*)"', data)
if pname:
clear_facts['distribution'] = pname.groups()[0]
return True, clear_facts return True, clear_facts
@ -454,7 +457,8 @@ class Distribution(object):
'AIX': ['AIX'], 'AIX': ['AIX'],
'HP-UX': ['HPUX'], 'HP-UX': ['HPUX'],
'Darwin': ['MacOSX'], 'Darwin': ['MacOSX'],
'FreeBSD': ['FreeBSD', 'TrueOS']} 'FreeBSD': ['FreeBSD', 'TrueOS'],
'ClearLinux': ['Clear Linux OS', 'Clear Linux Mix']}
OS_FAMILY = {} OS_FAMILY = {}
for family, names in OS_FAMILY_MAP.items(): for family, names in OS_FAMILY_MAP.items():

@ -1006,7 +1006,7 @@ PRIVACY_POLICY_URL="http://www.intel.com/privacy"
"name": "ClearLinux 26580", "name": "ClearLinux 26580",
"result": { "result": {
"distribution_release": "clear-linux-os", "distribution_release": "clear-linux-os",
"distribution": "ClearLinux", "distribution": "Clear Linux OS",
"distribution_major_version": "26580", "distribution_major_version": "26580",
"os_family": "ClearLinux", "os_family": "ClearLinux",
"distribution_version": "26580" "distribution_version": "26580"

Loading…
Cancel
Save