set ansible_os_family from name variable in os-release for clearlinux… (#49906)
* 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>
(cherry picked from commit 9202ef60b0
)
* Adding Changelog fragment
Signed-off-by: Josue David Hernandez Gutierrez <josue.d.hernandez.gutierrez@intel.com>
This commit is contained in:
parent
99772e6ac3
commit
e68541fa88
3 changed files with 8 additions and 2 deletions
|
@ -0,0 +1,2 @@
|
||||||
|
minor_changes:
|
||||||
|
- set ansible_os_family from name variable in os-release
|
|
@ -386,6 +386,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
|
||||||
|
|
||||||
|
|
||||||
|
@ -450,7 +453,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():
|
||||||
|
|
|
@ -949,7 +949,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…
Reference in a new issue