mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
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>
This commit is contained in:
parent
935fa51143
commit
9202ef60b0
2 changed files with 6 additions and 2 deletions
|
@ -390,6 +390,9 @@ class DistributionFiles:
|
|||
release = re.search('ID=(.*)', data)
|
||||
if release:
|
||||
clear_facts['distribution_release'] = release.groups()[0]
|
||||
pname = re.search('NAME="(.*)"', data)
|
||||
if pname:
|
||||
clear_facts['distribution'] = pname.groups()[0]
|
||||
return True, clear_facts
|
||||
|
||||
|
||||
|
@ -454,7 +457,8 @@ class Distribution(object):
|
|||
'AIX': ['AIX'],
|
||||
'HP-UX': ['HPUX'],
|
||||
'Darwin': ['MacOSX'],
|
||||
'FreeBSD': ['FreeBSD', 'TrueOS']}
|
||||
'FreeBSD': ['FreeBSD', 'TrueOS'],
|
||||
'ClearLinux': ['Clear Linux OS', 'Clear Linux Mix']}
|
||||
|
||||
OS_FAMILY = {}
|
||||
for family, names in OS_FAMILY_MAP.items():
|
||||
|
|
|
@ -1006,7 +1006,7 @@ PRIVACY_POLICY_URL="http://www.intel.com/privacy"
|
|||
"name": "ClearLinux 26580",
|
||||
"result": {
|
||||
"distribution_release": "clear-linux-os",
|
||||
"distribution": "ClearLinux",
|
||||
"distribution": "Clear Linux OS",
|
||||
"distribution_major_version": "26580",
|
||||
"os_family": "ClearLinux",
|
||||
"distribution_version": "26580"
|
||||
|
|
Loading…
Reference in a new issue