From eb820837ac83cdfdf4602a9c5b46681b3a488447 Mon Sep 17 00:00:00 2001 From: Kirk Strauser Date: Tue, 16 Jun 2015 15:17:52 -0700 Subject: [PATCH] Don't panic if AIX's uname doesn't support -W The current code expects "uname -W" on AIX to always succeed. The AIX 5 instance I have doesn't support the -W flag and facts gathering always crashes on it. This skips some WPAR handling code if "uname -W" doesn't work. --- lib/ansible/module_utils/facts.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/module_utils/facts.py b/lib/ansible/module_utils/facts.py index 06da6d53e32..87c9814ce85 100644 --- a/lib/ansible/module_utils/facts.py +++ b/lib/ansible/module_utils/facts.py @@ -2217,7 +2217,7 @@ class AIXNetwork(GenericBsdIfconfigNetwork, Network): rc, out, err = module.run_command([uname_path, '-W']) # don't bother with wpars it does not work # zero means not in wpar - if out.split()[0] == '0': + if not rc and out.split()[0] == '0': if current_if['macaddress'] == 'unknown' and re.match('^en', current_if['device']): entstat_path = module.get_bin_path('entstat') if entstat_path: