summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael DeHaan <michael.dehaan@gmail.com>2013-06-27 19:24:11 -0700
committerMichael DeHaan <michael.dehaan@gmail.com>2013-06-27 19:24:11 -0700
commit8584a945d689a02d8b1fb3ede9043433d364c23c (patch)
tree1f92ab8568c5972f475dac708b8c4c0eed52cbc8
parentf67c13f8f10a6f8e0343a3c3d4e8ad7737ed28ab (diff)
parent2b07873eb1786e788b5a29536d63f944bc190c63 (diff)
downloadansible-release1.2.tar.gz
Merge pull request #3307 from mplonka/release1.2release1.2
Skipping facts not available in AIX WPARs
-rw-r--r--library/system/setup6
1 files changed, 6 insertions, 0 deletions
diff --git a/library/system/setup b/library/system/setup
index 274fb469ee..08d5ae7fb5 100644
--- a/library/system/setup
+++ b/library/system/setup
@@ -995,6 +995,9 @@ class AIX(Hardware):
rc, out, err = module.run_command("/usr/sbin/lsdev -Cc processor")
+ if not out:
+ # CPU info may not be available (WPAR)
+ return
i = 0
for line in out.split('\n'):
@@ -1032,6 +1035,9 @@ class AIX(Hardware):
# /dev/ada0p3 314368 0 314368 0%
#
rc, out, err = module.run_command("/usr/sbin/lsps -s")
+ if not out:
+ # swapinfo may not be available (WPAR)
+ return
lines = out.split('\n')
data = lines[1].split()
swaptotal_mb = long(data[0].rstrip('MB'))