After ultimately having set up a test Windows Server 2008 R2 box to work with Ansible (it failed at first, but I thought I had solved the problem at the Ansible control), I’ve tried to get it working on two other Server boxes. I set these up via the instructions found at http://docs.ansible.com/intro_windows.html. However, whereas my test server returns “success” to win_ping, the newly set up boxes return “Servername | FAILED => 500 WinRMTransport. [Errno 104] Connection reset by peer”. I’ve tried everything I can (e.g. disabled Windows Firewall, added a Windows hotfix, etc.), but nothing is working. Does anyone have any ideas as to why this isn’t working?
If you’re using ssl, there has been a change in how python handles self signed certificates recently. Although if you got one working, this might not be your issue.
2/ Check you are using the correct port 5986 for https, 5985 for http
3/ Check your machine names are resolvable by your local dns.
4/ Check the windows event log on your managed hosts. When things are working there will be a login event.
5/ run with -vvvvv to see all the communication logging between ansible and your managed windows hosts.
3/ Check your machine names are resolvable from your Ansible master.
4/ Check the windows event log on your managed hosts. When things are working, there will be a login event. If there’s no login event its probably not finished setting up the communications channel.
5/ run ansible-playbook -vvvvv to see all the communication logging between ansible and your managed windows machine.
Thank you, Michael and J. I must be a complete lamer, because I’m just not getting this to work. Here’s the latest:
the original machine that I got Ansible working with now doesn’t work. win_ping returns the dreaded “WINRM CONNECTION ERROR: 401 Unauthorized. basic auth failed”, despite the fact that I get a “411” when i try the curl test command.
i got Ansible working on a second machine, although I don’t know which combination of of things I did (many) to get it working, despite the fact that I get a “401” when i try the curl test command.
I ran through the checklist that J provided, and everything that I was supposed to do I did (e.g. Check you are using the correct port 5986 for https, 5985 for http).
Your contniued help is appreciated. This is a real hair puller!