Commit 301a00cc by James Cammarata

Merge branch 'obsd-fix-release' of https://github.com/johanwiren/ansible into…

Merge branch 'obsd-fix-release' of https://github.com/johanwiren/ansible into johanwiren-obsd-fix-release
parents 478c4008 e9554e5d
...@@ -274,9 +274,9 @@ class Facts(object): ...@@ -274,9 +274,9 @@ class Facts(object):
self.facts['distribution'] = 'OpenBSD' self.facts['distribution'] = 'OpenBSD'
self.facts['distribution_release'] = platform.release() self.facts['distribution_release'] = platform.release()
rc, out, err = module.run_command("/sbin/sysctl -n kern.version") rc, out, err = module.run_command("/sbin/sysctl -n kern.version")
data = re.search('OpenBSD\s[0-9]+.[0-9]+(-\S+)?\s.*', out) match = re.match('OpenBSD\s[0-9]+.[0-9]+-(\S+)\s.*', out)
if data: if match:
self.facts['distribution_version'] = data.groups()[0][1:] self.facts['distribution_version'] = match.groups()[0]
else: else:
self.facts['distribution_version'] = 'release' self.facts['distribution_version'] = 'release'
else: else:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment