mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Fix fact ansible_distribution_version for AIX (#48570)
* Fix fact ansible_distribution_version for AIX * aix_facts: Check oslevel output
This commit is contained in:
parent
ae2467ddbc
commit
6404c6484c
1 changed files with 5 additions and 2 deletions
|
@ -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…
Reference in a new issue