Hello,

I resolved by myself for this problem.
I have tried two workarounds.

I found that a win_get_url is not supported authentication http proxy.
( I use authentication http proxy of my office )
After I modified to add authentication http proxy by manual for the
win_get_url.ps1 file I can success to run this modules.
Also , there is problem in
"http://download-codeplex.sec.s-msft.com/Download/Release?ProjectName=pscx&DownloadId=923562&FileTime=130585918034470000&Build=20959";
, this module got the top download page for .exe". Therefore , I
created an another download url.



Takeshi.K




2015-08-27 9:42 GMT+09:00 Takeshi Kuramochi <[email protected]>:
> Hi,
>
> I am trying some windows modules.
>
> My test environment below :
> - Control machine : CentOS 6.6 x86_64 , Ansible version : v2.0.0
> - Remote machine : Windows Server 2012 R2 Standard
>
> I found the win_unzip module document then I tried the following.
>
>
> # Install PSCX to use for extracting a gz file
>   - name: Grab PSCX msi
>     win_get_url:
>       url: 
> 'http://download-codeplex.sec.s-msft.com/Download/Release?ProjectName=pscx&DownloadId=923562&FileTime=130585918034470000&Build=20959'
>       dest: 'C:\pscx.msi'
>   - name: Install PSCX
>     win_msi:
>       path: 'C:\pscx.msi'
>   - name: Unzip gz log
>     win_unzip:
>       src: "C:\Logs\application-error-logs.gz"
>       dest: "C:\ExtractedLogs\application-error-logs"
>
>
> However , I saw that the win_get_url failed to get PSCX.msi.
>
>
>
> TASK [Grab PSCX msi] 
> ***********************************************************
> <10.1.1.6> ESTABLISH WINRM CONNECTION FOR USER: Administrator on PORT
> 5986 TO 10.1.1.6
> <10.1.1.6> EXEC (New-Item -Type Directory -Path $env:temp -Name
> "ansible-tmp-1440635296.7-251435026679972").FullName | Write-Host
> -Separator '';
> <10.1.1.6> PUT "/tmp/tmpRR0wmP" TO
> "C:\Users\Administrator\AppData\Local\Temp\ansible-tmp-1440635296.7-251435026679972\win_get_url"
> <10.1.1.6> EXEC Try { &
> "C:\Users\Administrator\AppData\Local\Temp\ansible-tmp-1440635296.7-251435026679972\win_get_url.ps1"
> }
> Catch { throw }
> Finally { Remove-Item
> "C:\Users\Administrator\AppData\Local\Temp\ansible-tmp-1440635296.7-251435026679972"
> -Force -Recurse -ErrorAction SilentlyContinue }
> fatal: [10.1.1.6]: FAILED! => {"changed": false, "failed": true,
> "msg": "Error downloading
> http://download-codeplex.sec.s-msft.com/Download/Release?ProjectName=pscx&DownloadId=923562&FileTime=130585918034470000&Build=20959
> to C:\\Users\\Administrator\\Desktop\\pscx.msi"}
>
>
>
> I could get other file from another web site by win_get_url. Also when
> I use a browser to get this file on remote machine, it was success.
> Could you give me some advice?
>
>
>
>
> Regards,
> Takeshi.K

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAOpn5sQoWbk%3Dd4B%3D4Nnhw2MGp9CtN6YM%2B_2UpVswYRcNf3aDnQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to