Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix ansible_os_family fact on openSUSE Leap #14546

Merged
merged 1 commit into from
Feb 20, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 4 additions & 3 deletions lib/ansible/module_utils/facts.py
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ def get_distribution_facts(self):
Archlinux = 'Archlinux', Manjaro = 'Archlinux', Mandriva = 'Mandrake', Mandrake = 'Mandrake', Altlinux = 'Altlinux',
Solaris = 'Solaris', Nexenta = 'Solaris', OmniOS = 'Solaris', OpenIndiana = 'Solaris',
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
Expand Down Expand Up @@ -511,8 +511,9 @@ def get_distribution_facts(self):
machine_id = machine_id.split('\n')[0]
self.facts["machine_id"] = machine_id
self.facts['os_family'] = self.facts['distribution']
if self.facts['distribution'] in OS_FAMILY:
self.facts['os_family'] = OS_FAMILY[self.facts['distribution']]
distro = self.facts['distribution'].replace(' ', '_')
if distro in OS_FAMILY:
self.facts['os_family'] = OS_FAMILY[distro]

def get_cmdline(self):
data = get_file_content('/proc/cmdline')
Expand Down