mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Merge pull request #14546 from furlongm/devel
fix ansible_os_family fact on openSUSE Leap
This commit is contained in:
commit
547afda8d4
1 changed files with 4 additions and 3 deletions
|
@ -274,7 +274,7 @@ class Facts(object):
|
||||||
Archlinux = 'Archlinux', Manjaro = 'Archlinux', Mandriva = 'Mandrake', Mandrake = 'Mandrake', Altlinux = 'Altlinux',
|
Archlinux = 'Archlinux', Manjaro = 'Archlinux', Mandriva = 'Mandrake', Mandrake = 'Mandrake', Altlinux = 'Altlinux',
|
||||||
Solaris = 'Solaris', Nexenta = 'Solaris', OmniOS = 'Solaris', OpenIndiana = 'Solaris',
|
Solaris = 'Solaris', Nexenta = 'Solaris', OmniOS = 'Solaris', OpenIndiana = 'Solaris',
|
||||||
SmartOS = 'Solaris', AIX = 'AIX', Alpine = 'Alpine', MacOSX = 'Darwin',
|
SmartOS = 'Solaris', AIX = 'AIX', Alpine = 'Alpine', MacOSX = 'Darwin',
|
||||||
FreeBSD = 'FreeBSD', HPUX = 'HP-UX'
|
FreeBSD = 'FreeBSD', HPUX = 'HP-UX', openSUSE_Leap = 'Suse'
|
||||||
)
|
)
|
||||||
|
|
||||||
# TODO: Rewrite this to use the function references in a dict pattern
|
# TODO: Rewrite this to use the function references in a dict pattern
|
||||||
|
@ -511,8 +511,9 @@ class Facts(object):
|
||||||
machine_id = machine_id.split('\n')[0]
|
machine_id = machine_id.split('\n')[0]
|
||||||
self.facts["machine_id"] = machine_id
|
self.facts["machine_id"] = machine_id
|
||||||
self.facts['os_family'] = self.facts['distribution']
|
self.facts['os_family'] = self.facts['distribution']
|
||||||
if self.facts['distribution'] in OS_FAMILY:
|
distro = self.facts['distribution'].replace(' ', '_')
|
||||||
self.facts['os_family'] = OS_FAMILY[self.facts['distribution']]
|
if distro in OS_FAMILY:
|
||||||
|
self.facts['os_family'] = OS_FAMILY[distro]
|
||||||
|
|
||||||
def get_cmdline(self):
|
def get_cmdline(self):
|
||||||
data = get_file_content('/proc/cmdline')
|
data = get_file_content('/proc/cmdline')
|
||||||
|
|
Loading…
Reference in a new issue