Merge pull request #2416 from nitzmahone/win_setup_mem_fix
fixed ansible_totalmem fact returning 0
This commit is contained in:
commit
ad6a751668
1 changed files with 2 additions and 4 deletions
|
@ -26,11 +26,9 @@ $result = New-Object psobject @{
|
|||
};
|
||||
|
||||
$win32_os = Get-CimInstance Win32_OperatingSystem
|
||||
$win32_cs = Get-CimInstance Win32_ComputerSystem
|
||||
$osversion = [Environment]::OSVersion
|
||||
$memory = @()
|
||||
$memory += Get-WmiObject win32_Physicalmemory
|
||||
$capacity = 0
|
||||
$memory | foreach {$capacity += $_.Capacity}
|
||||
$capacity = $win32_cs.TotalPhysicalMemory # Win32_PhysicalMemory is empty on some virtual platforms
|
||||
$netcfg = Get-WmiObject win32_NetworkAdapterConfiguration
|
||||
|
||||
$ActiveNetcfg = @(); $ActiveNetcfg+= $netcfg | where {$_.ipaddress -ne $null}
|
||||
|
|
Loading…
Reference in a new issue