Merge pull request #10643 from bcoca/aix_facts_fix
fix for when calling bootinfo throws permmission errors (AIX)
This commit is contained in:
commit
b509de6c84
1 changed files with 6 additions and 3 deletions
|
@ -172,9 +172,12 @@ class Facts(object):
|
|||
if self.facts['system'] == 'Linux':
|
||||
self.get_distribution_facts()
|
||||
elif self.facts['system'] == 'AIX':
|
||||
rc, out, err = module.run_command("/usr/sbin/bootinfo -p")
|
||||
data = out.split('\n')
|
||||
self.facts['architecture'] = data[0]
|
||||
try:
|
||||
rc, out, err = module.run_command("/usr/sbin/bootinfo -p")
|
||||
data = out.split('\n')
|
||||
self.facts['architecture'] = data[0]
|
||||
except:
|
||||
self.facts['architectrure' = 'Not Available'
|
||||
elif self.facts['system'] == 'OpenBSD':
|
||||
self.facts['architecture'] = platform.uname()[5]
|
||||
|
||||
|
|
Loading…
Reference in a new issue