From 8ad182059d5a085e4f8ecfe8ae63bad14a7dc01c Mon Sep 17 00:00:00 2001 From: Abhijeet Kasurde Date: Wed, 10 May 2017 10:49:41 +0530 Subject: [PATCH] Add check for processor_core value Fixes #21893 Signed-off-by: Abhijeet Kasurde --- 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 46b0654171..662990a3f1 100644 --- a/lib/ansible/module_utils/facts.py +++ b/lib/ansible/module_utils/facts.py @@ -1204,7 +1204,7 @@ class LinuxHardware(Hardware): self.facts['processor_count'] = i socket_values = list(sockets.values()) - if socket_values: + if socket_values and socket_values[0]: self.facts['processor_cores'] = socket_values[0] else: self.facts['processor_cores'] = 1