Merge pull request #4115 from r-p-e/devel

Add some more OpenBSD facts
reviewable/pr18780/r1
Michael DeHaan 11 years ago
commit 7ea2f04888

@ -268,6 +268,15 @@ class Facts(object):
self.facts['distribution'] = 'FreeBSD'
self.facts['distribution_release'] = platform.release()
self.facts['distribution_version'] = platform.version()
elif self.facts['system'] == 'OpenBSD':
self.facts['distribution'] = 'OpenBSD'
self.facts['distribution_release'] = platform.release()
rc, out, err = module.run_command("/sbin/sysctl -n kern.version")
data = re.search('OpenBSD\s[0-9]+.[0-9]+(-\S+)?\s.*', out)
if data:
self.facts['distribution_version'] = data.groups()[0][1:]
else:
self.facts['distribution_version'] = 'release'
else:
dist = platform.dist()
self.facts['distribution'] = dist[0].capitalize() or 'NA'

Loading…
Cancel
Save