I’ve reinstalled everything and am still having trouble getting win_ping to work. Here is my info:
Fedora 20
Ansible 1.7.1
Remote node running windows 7
The WinRM script by Trond runs without errors on the remote node
Control and Remote Machines are both on Lan with common domain w/o firewalls
So far as I can tell I’ve installed everything on control and remote machine as described in documentation
My inventory file contains
[windows]
123.123.123.123
My windows.yml file is in the group_vars directory and contains
ansible_ssh_user: Administrator
ansible_ssh_pass: ansiblepw
ansible_ssh_port: 5986
ansible_connection: winrm
Should this file begin with “—”?
Can you tell what I’m doing wrong? Do you need any more information?
[ansmgr@dhcp1-59-159 ansible]$ ansible windows -m win_ping --ask-pass -vvvv
SSH password:
<123.123.123.123> ESTABLISH WINRM CONNECTION FOR USER: Administrator on PORT 5986 TO 123.123.123.123
<123.123.123.123> WINRM CONNECT: transport=plaintext endpoint=https://123.123.123.123:5986/wsman
<123.123.123.123> WINRM CONNECTION ERROR: 500 WinRMTransport. [Errno 104] Connection reset by peer
<123.123.123.123> WINRM CONNECT: transport=plaintext endpoint=http://123.123.123.123:5986/wsman
123.123.123.123 | FAILED => Traceback (most recent call last):
File “/etc/ansible/lib/ansible/runner/init.py”, line 549, in _executor
exec_rc = self._executor_internal(host, new_stdin)
File “/etc/ansible/lib/ansible/runner/init.py”, line 707, in _executor_internal
return self._executor_internal_inner(host, self.module_name, self.module_args, inject, port, complex_args=complex_args)
File “/etc/ansible/lib/ansible/runner/init.py”, line 870, in _executor_internal_inner
conn = self.connector.connect(actual_host, actual_port, actual_user, actual_pass, actual_transport, actual_private_key_file)
File “/etc/ansible/lib/ansible/runner/connection.py”, line 44, in connect
self.active = conn.connect()
File “/etc/ansible/lib/ansible/runner/connection_plugins/winrm.py”, line 132, in connect
self.protocol = self._winrm_connect()
File “/etc/ansible/lib/ansible/runner/connection_plugins/winrm.py”, line 86, in _winrm_connect
protocol.send_message(‘’)
File “/usr/lib/python2.7/site-packages/winrm/protocol.py”, line 173, in send_message
return self.transport.send_message(message)
File “/usr/lib/python2.7/site-packages/winrm/transport.py”, line 76, in send_message
response = urlopen(request, timeout=self.timeout)
File “/usr/lib64/python2.7/urllib2.py”, line 127, in urlopen
return _opener.open(url, data, timeout)
File “/usr/lib64/python2.7/urllib2.py”, line 404, in open
response = self._open(req, data)
File “/usr/lib64/python2.7/urllib2.py”, line 422, in _open
‘_open’, req)
File “/usr/lib64/python2.7/urllib2.py”, line 382, in _call_chain
result = func(*args)
File “/usr/lib64/python2.7/urllib2.py”, line 1216, in http_open
return self.do_open(httplib.HTTPConnection, req)
File “/usr/lib64/python2.7/urllib2.py”, line 1189, in do_open
r = h.getresponse(buffering=True)
File “/usr/lib64/python2.7/httplib.py”, line 1045, in getresponse
response.begin()
File “/usr/lib64/python2.7/httplib.py”, line 409, in begin
version, status, reason = self._read_status()
File “/usr/lib64/python2.7/httplib.py”, line 365, in _read_status
line = self.fp.readline(_MAXLINE + 1)
File “/usr/lib64/python2.7/socket.py”, line 476, in readline
data = self._sock.recv(self._rbufsize)
error: [Errno 104] Connection reset by peer