Revert "replace math round with ceiling for ansible_memtotal_mb + add new variables to display swapfile config (#49611)" (#49876)

This reverts commit b3ac5b637a.
pull/49880/head
Jordan Borean 6 years ago committed by GitHub
parent af5d84b70b
commit 2adb9f32ae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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

Loading…
Cancel
Save