Win setup processor (#61425)
* Fix incorrect processor information Fixes Issue #45869 Windows Processor Information Incorrect from Setup * set ansible_processor as list of all cores and threads (mirroring POSIX facts) * change to $win32_cs.NumberOfLogicalProcessors to calculate $cpu_list * Simplify vcpus count source Co-authored-by: Jesse Kaufman <jesse.kaufman@gmail.com>
This commit is contained in:
parent
161c1ce17e
commit
a95f9c6640
1 changed files with 3 additions and 3 deletions
|
@ -362,7 +362,7 @@ if($gather_subset.Contains('processor')) {
|
|||
}
|
||||
|
||||
$cpu_list = @( )
|
||||
for ($i=1; $i -le ($win32_cpu.NumberOfLogicalProcessors / $win32_cs.NumberOfProcessors); $i++) {
|
||||
for ($i=1; $i -le $win32_cs.NumberOfLogicalProcessors; $i++) {
|
||||
$cpu_list += $win32_cpu.Manufacturer
|
||||
$cpu_list += $win32_cpu.Name
|
||||
}
|
||||
|
@ -371,8 +371,8 @@ if($gather_subset.Contains('processor')) {
|
|||
ansible_processor = $cpu_list
|
||||
ansible_processor_cores = $win32_cpu.NumberOfCores
|
||||
ansible_processor_count = $win32_cs.NumberOfProcessors
|
||||
ansible_processor_threads_per_core = ($win32_cpu.NumberOfLogicalProcessors / $win32_cs.NumberOfProcessors / $win32_cpu.NumberOfCores)
|
||||
ansible_processor_vcpus = ($win32_cpu.NumberOfLogicalProcessors / $win32_cs.NumberOfProcessors)
|
||||
ansible_processor_threads_per_core = ($win32_cpu.NumberOfLogicalProcessors / $win32_cpu.NumberofCores)
|
||||
ansible_processor_vcpus = $win32_cs.NumberOfLogicalProcessors
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue