mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-30 00:21:23 -07: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:
parent
72ca3b2b5b
commit
30e5999812
1 changed files with 2 additions and 5 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue