mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-06 10:43:14 +00:00
Merge branch 'obsd-fix-release' of https://github.com/johanwiren/ansible into johanwiren-obsd-fix-release
This commit is contained in:
@@ -274,9 +274,9 @@ class Facts(object):
|
||||
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:]
|
||||
match = re.match('OpenBSD\s[0-9]+.[0-9]+-(\S+)\s.*', out)
|
||||
if match:
|
||||
self.facts['distribution_version'] = match.groups()[0]
|
||||
else:
|
||||
self.facts['distribution_version'] = 'release'
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user