diff options
author | Jordan Borean <jborean93@gmail.com> | 2018-12-13 12:33:55 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-13 12:33:55 +0100 |
commit | 2adb9f32ae3dae172b5bc59826e467ddaa58e1d0 (patch) | |
tree | fde08c4d2a41dcbf87cfd72fb00d83a0a83ca80a | |
parent | Properly report install failures from dnf module (#49760) (diff) | |
download | ansible-2adb9f32ae3dae172b5bc59826e467ddaa58e1d0.tar.xz ansible-2adb9f32ae3dae172b5bc59826e467ddaa58e1d0.zip |
Revert "replace math round with ceiling for ansible_memtotal_mb + add new variables to display swapfile config (#49611)" (#49876)
This reverts commit b3ac5b637a4ff6259c82b659517ab04f5c0b2f11.
-rw-r--r-- | lib/ansible/modules/windows/setup.ps1 | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/lib/ansible/modules/windows/setup.ps1 b/lib/ansible/modules/windows/setup.ps1 index ef0a52e625..e81d328b78 100644 --- a/lib/ansible/modules/windows/setup.ps1 +++ b/lib/ansible/modules/windows/setup.ps1 @@ -296,17 +296,14 @@ if ($gather_subset.Contains("local") -and $factpath -ne $null) { if($gather_subset.Contains('memory')) { $win32_cs = Get-LazyCimInstance Win32_ComputerSystem $win32_os = Get-LazyCimInstance Win32_OperatingSystem - $win32_pf = Get-LazyCimInstance Win32_PageFileSetting $ansible_facts += @{ # Win32_PhysicalMemory is empty on some virtual platforms - ansible_memtotal_mb = ([math]::ceiling($win32_cs.TotalPhysicalMemory / 1024 / 1024)) - ansible_swaptotal_mb = ([math]::round($win32_os.TotalSwapSpaceSize / 1024)) - ansible_memtotal = $win32_cs.TotalPhysicalMemory - ansible_swap_min = $win32_pf.InitialSize * 1024 * 1024 - ansible_swap_max = $win32_pf.MaximumSize * 1024 * 1024 + ansible_memtotal_mb = ([math]::round($win32_cs.TotalPhysicalMemory / 1024 / 1024)) + ansible_swaptotal_mb = ([math]::round($win32_os.TotalSwapSpaceSize / 1024 / 1024)) } } + if($gather_subset.Contains('platform')) { $win32_cs = Get-LazyCimInstance Win32_ComputerSystem $win32_os = Get-LazyCimInstance Win32_OperatingSystem |