diff options
author | Matt Martz <matt@sivel.net> | 2014-06-18 10:07:46 -0500 |
---|---|---|
committer | Matt Martz <matt@sivel.net> | 2014-06-19 14:24:14 -0500 |
commit | d30f0e384a609217b4ba1bb1339c6ad207cbf434 (patch) | |
tree | 6c5dd71480543a38d5eec6d0b57a3ace7791499c /windows/setup.ps1 | |
parent | 3bba3be68b62f8e46e22c07eb4253d6da92ca3e4 (diff) | |
download | ansible-modules-core-d30f0e384a609217b4ba1bb1339c6ad207cbf434.tar.gz |
setup.ps1 willnot support fact_path and filter to start
Diffstat (limited to 'windows/setup.ps1')
-rw-r--r-- | windows/setup.ps1 | 38 |
1 files changed, 2 insertions, 36 deletions
diff --git a/windows/setup.ps1 b/windows/setup.ps1 index 585be631..883c2792 100644 --- a/windows/setup.ps1 +++ b/windows/setup.ps1 @@ -17,34 +17,14 @@ # WANT_JSON # POWERSHELL_COMMON -$params = Parse-Args $args; - -$fact_path = "C:\ansible\facts.d" -If ($params.fact_path.GetType) -{ - $fact_path = $params.fact_path; -} - -$filter = "*" -If ($params.filter.GetType) -{ - $filter = $params.filter; -} +# $params is not currently used in this module +# $params = Parse-Args $args; $result = New-Object psobject @{ ansible_facts = New-Object psobject changed = $false }; -If (Test-Path $fact_path) -{ - Get-ChildItem $fact_path -Filter *.fact | Foreach-Object - { - $facts = Get-Content $_ | ConvertFrom-Json - # TODO: Need to concatentate this with $result - } -} - $osversion = [Environment]::OSVersion Set-Attr $result.ansible_facts "ansible_hostname" $env:COMPUTERNAME; @@ -54,18 +34,4 @@ Set-Attr $result.ansible_facts "ansible_os_family" "Windows" Set-Attr $result.ansible_facts "ansible_distribution" $osversion.VersionString Set-Attr $result.ansible_facts "ansible_distribution_version" $osversion.Version.ToString() -# Need to figure out how to filter the code. Below is a start but not implemented -#If ($filter != "*") -#{ -# $filtered = New-Object psobject; -# $result.psobject.properties | Where -# { -# $_.Name -like $filter | -# } -#} -#Else -#{ -# $filtered = $result; -#} - echo $result | ConvertTo-Json; |