mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +00:00
Fix distribution_facts missing on BSD (#15780)
The previous fix in #15773 only solved MacOSX, but left other BSDs broken fixes #15768
This commit is contained in:
@@ -653,10 +653,7 @@ class Distribution(object):
|
||||
self.module = module
|
||||
|
||||
def populate(self):
|
||||
if self.system == 'Linux':
|
||||
self.get_distribution_facts()
|
||||
elif self.system == 'Darwin':
|
||||
self.get_distribution_facts()
|
||||
self.get_distribution_facts()
|
||||
return self.facts
|
||||
|
||||
def get_distribution_facts(self):
|
||||
@@ -678,7 +675,7 @@ class Distribution(object):
|
||||
cleanedname = self.system.replace('-','')
|
||||
distfunc = getattr(self, 'get_distribution_'+cleanedname)
|
||||
distfunc()
|
||||
else:
|
||||
elif self.system == 'Linux':
|
||||
# try to find out which linux distribution this is
|
||||
dist = platform.dist()
|
||||
self.facts['distribution'] = dist[0].capitalize() or 'NA'
|
||||
|
||||
Reference in New Issue
Block a user