Skip to content

Commit

Permalink
Add processor_vcpu fact for Darwin (ansible#30708)
Browse files Browse the repository at this point in the history
Fix adds fact related to vcpu in Darwin's setup.

Fixes: ansible#30688

Signed-off-by: Abhijeet Kasurde <[email protected]>
  • Loading branch information
Akasurde authored and alikins committed Sep 22, 2017
1 parent 12404f4 commit e1dcfda
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/ansible/module_utils/facts/hardware/darwin.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ def get_cpu_facts(self):
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

Expand Down

0 comments on commit e1dcfda

Please sign in to comment.