From e1dcfda172a7230d2888e25fa8ca0a12c497cda7 Mon Sep 17 00:00:00 2001 From: Abhijeet Kasurde Date: Sat, 23 Sep 2017 00:02:59 +0530 Subject: [PATCH] Add processor_vcpu fact for Darwin (#30708) Fix adds fact related to vcpu in Darwin's setup. Fixes: #30688 Signed-off-by: Abhijeet Kasurde --- lib/ansible/module_utils/facts/hardware/darwin.py | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/ansible/module_utils/facts/hardware/darwin.py b/lib/ansible/module_utils/facts/hardware/darwin.py index c99e459353..f4664d5031 100644 --- a/lib/ansible/module_utils/facts/hardware/darwin.py +++ b/lib/ansible/module_utils/facts/hardware/darwin.py @@ -79,6 +79,7 @@ class DarwinHardware(Hardware): system_profile = self.get_system_profile() cpu_facts['processor'] = '%s @ %s' % (system_profile['Processor Name'], system_profile['Processor Speed']) cpu_facts['processor_cores'] = self.sysctl['hw.physicalcpu'] + cpu_facts['processor_vcpus'] = self.sysctl.get('hw.logicalcpu') or self.sysctl.get('hw.ncpu') or '' return cpu_facts