Ansible winrm problem

924 views
Skip to first unread message

David O'Brien

unread,
Mar 31, 2016, 2:18:56 AM3/31/16
to Ansible Project
Hi guys,

I'm spinning up EC2 instances on AWS and I'm getting the following error:
TASK [setup] *******************************************************************
<10.178.73.194> ESTABLISH WINRM CONNECTION FOR USER: Administrator on PORT 5986 TO 10.178.73.194
fatal
: [ip-10-178-73-194.ap-southeast-2.compute.internal]: FAILED! => {"failed": true, "msg": "ssl: 500 WinRMTransport. Tunnel connection failed: 403 Forbidden"}

I can telnet just fine to that machine on 5986 and using the same credentials, logged on to Windows I can setup a New-PSSession without issues.

$options = New-PSSessionOption -SkipCACheck -SkipCNCheck -SkipRevocationCheck
New-PSSession -ComputerName "10.178.73.194" -UseSSL -Credential $cred -SessionOption $options


 
Id Name            ComputerName    State         ConfigurationName     Availability
 
-- ----            ------------    -----         -----------------     ------------
 
4 Session4        10.178.73.194   Opened        Microsoft.PowerShell     Available

Anybody an idea what's happening?

Cheers!

J Hawkesworth

unread,
Mar 31, 2016, 5:04:00 AM3/31/16
to Ansible Project
Guessing here, since this is not something I've tried

This poster seemed to get the same error as you:  In his case there was a proxy involved.  Would there be a proxy in your scenario too?  I think there are winrm proxy settings now although this isn't something I've tried.

http://search-devops.com/m/PLILD1J1SKcY32cn&subj=+ansible+project+Ansible+connect+to+Windows+instance+through+proxy

HTH

Jon

David O'Brien

unread,
Mar 31, 2016, 8:45:54 PM3/31/16
to Ansible Project
Yeah, I saw that one and I'm already setting all the no_proxy environment variables on my Ansible machine.
The odd thing is, I can telnet just fine, just can't connect.

I tried the pywinrm module directly and get the same error. Printing out the python os.environ.keys I can see all my proxy settings.

Running out of ideas here.

Quang Truong

unread,
Mar 31, 2016, 9:35:22 PM3/31/16
to Ansible Project
Have you try to run the EnableAnsible.ps1 before? I encountered this error usually because the preparation for WinRM wasn't run successfully

Quang
Reply all
Reply to author
Forward
0 new messages