diff --git a/examples/scripts/upgrade_to_ps3.ps1 b/examples/scripts/upgrade_to_ps3.ps1 index c9096b22f4..567dc7ba87 100644 --- a/examples/scripts/upgrade_to_ps3.ps1 +++ b/examples/scripts/upgrade_to_ps3.ps1 @@ -28,7 +28,6 @@ $powershellpath = "C:\powershell" function download-file { - Get-Process | Out-File c:\powershell\whatisrunningrightnow.txt param ([string]$path, [string]$local) $client = new-object system.net.WebClient $client.Headers.Add("user-agent", "PowerShell") @@ -78,6 +77,6 @@ else } $FileName = $DownLoadUrl.Split('/')[-1] -# download-file $downloadurl "$powershellpath\$filename" - +download-file $downloadurl "$powershellpath\$filename" +write-host "$powershellpath\$filename" ."$powershellpath\$filename" /quiet /log "C:\powershell\install.log" diff --git a/test/integration/roles/test_win_setup/tasks/main.yml b/test/integration/roles/test_win_setup/tasks/main.yml new file mode 100644 index 0000000000..a62e49936f --- /dev/null +++ b/test/integration/roles/test_win_setup/tasks/main.yml @@ -0,0 +1,35 @@ +# test code for the setup module when using winrm connection +# (c) 2014, Chris Church + +# This file is part of Ansible +# +# Ansible is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# Ansible is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Ansible. If not, see . + +- name: test setup module + action: setup + register: setup_result + +- name: check setup result + assert: + that: + - "not setup_result|failed" + - "not setup_result|changed" + - "setup_result.ansible_facts" + - "setup_result.ansible_facts.ansible_os_family == 'Windows'" + - "setup_result.ansible_facts.ansible_distribution" + - "setup_result.ansible_facts.ansible_distribution_version" + - "setup_result.ansible_facts.ansible_fqdn" + - "setup_result.ansible_facts.ansible_hostname" + - "setup_result.ansible_facts.ansible_ip_addresses" + - "setup_result.ansible_facts.ansible_system" diff --git a/test/integration/test_winrm.yml b/test/integration/test_winrm.yml index f8bde65912..81443d4dbf 100644 --- a/test/integration/test_winrm.yml +++ b/test/integration/test_winrm.yml @@ -6,6 +6,7 @@ - { role: test_win_raw, tags: test_win_raw } - { role: test_win_script, tags: test_win_script } - { role: test_win_ping, tags: test_win_ping } + - { role: test_win_setup, tags: test_win_setup } - { role: test_win_slurp, tags: test_win_slurp } - { role: test_win_fetch, tags: test_win_fetch } - { role: test_win_stat, tags: test_win_stat }