Fix fact ansible_distribution_version for AIX (#48570)

* Fix fact ansible_distribution_version for AIX

* aix_facts: Check oslevel output
pull/49228/head
jokurz 6 years ago committed by Brian Coca
parent ae2467ddbc
commit 6404c6484c

@ -503,8 +503,11 @@ class Distribution(object):
rc, out, err = self.module.run_command("/usr/bin/oslevel")
data = out.split('.')
aix_facts['distribution_major_version'] = data[0]
aix_facts['distribution_version'] = data[0]
aix_facts['distribution_release'] = data[1]
if len(data) > 1:
aix_facts['distribution_version'] = '%s.%s' % (data[0], data[1])
aix_facts['distribution_release'] = data[1]
else:
aix_facts['distribution_version'] = data[0]
return aix_facts
def get_distribution_HPUX(self):

Loading…
Cancel
Save