mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
On OpenBSD, swap the values for distribution_version and distribution_release
This commit is contained in:
parent
0d46805979
commit
4c0188a27b
1 changed files with 3 additions and 2 deletions
|
@ -764,12 +764,13 @@ class Distribution(object):
|
|||
self.facts['distribution_version'] = '%s.%s' % (data.group(1), data.group(2))
|
||||
|
||||
def get_distribution_OpenBSD(self):
|
||||
self.facts['distribution_version'] = platform.release()
|
||||
rc, out, err = self.module.run_command("/sbin/sysctl -n kern.version")
|
||||
match = re.match('OpenBSD\s[0-9]+.[0-9]+-(\S+)\s.*', out)
|
||||
if match:
|
||||
self.facts['distribution_version'] = match.groups()[0]
|
||||
self.facts['distribution_release'] = match.groups()[0]
|
||||
else:
|
||||
self.facts['distribution_version'] = 'release'
|
||||
self.facts['distribution_release'] = 'release'
|
||||
|
||||
def get_distribution_DragonFly(self):
|
||||
pass
|
||||
|
|
Loading…
Reference in a new issue