Fix distribution_facts missing on BSD (#15780)

The previous fix in #15773 only solved MacOSX, but left other BSDs broken

fixes #15768
pull/15781/head
Robin Roth 9 years ago committed by Brian Coca
parent 72ca3b2b5b
commit 30e5999812

@ -653,10 +653,7 @@ class Distribution(object):
self.module = module self.module = module
def populate(self): def populate(self):
if self.system == 'Linux': self.get_distribution_facts()
self.get_distribution_facts()
elif self.system == 'Darwin':
self.get_distribution_facts()
return self.facts return self.facts
def get_distribution_facts(self): def get_distribution_facts(self):
@ -678,7 +675,7 @@ class Distribution(object):
cleanedname = self.system.replace('-','') cleanedname = self.system.replace('-','')
distfunc = getattr(self, 'get_distribution_'+cleanedname) distfunc = getattr(self, 'get_distribution_'+cleanedname)
distfunc() distfunc()
else: elif self.system == 'Linux':
# try to find out which linux distribution this is # try to find out which linux distribution this is
dist = platform.dist() dist = platform.dist()
self.facts['distribution'] = dist[0].capitalize() or 'NA' self.facts['distribution'] = dist[0].capitalize() or 'NA'

Loading…
Cancel
Save