Im new to ansible .Getting connection refused error while doing ping to 
windows client machines. Could any one help me where i am doing wrong.
ansible server OS version: REDHAT 6.7

client os: windows 2012 R2
client firewall status: disabled
Im able to do ping /telnet to client machine from server.

getting connection error while doing ping

[root@stonecold ansible]# ansible windows -i hosts -m win_ping -vvvvv
/usr/lib/python2.6/site-packages/pycrypto-2.6.1-py2.6-linux-x86_64.egg/
Crypto/Util/number.py:57: PowmInsecureWarning: Not using mpz_powm_sec.  You 
should rebuild using libgmp >= 5 to avoid timing attack vulnerability.
  _warn("Not using mpz_powm_sec.  You should rebuild using libgmp >= 5 to 
avoid timing attack vulnerability.", PowmInsecureWarning)
No config file found; using defaults
Loaded callback minimal of type stdout, v2.0
Using module file /usr/lib/python2.6/site-packages/ansible-2.2.0-py2.6.egg/
ansible/modules/core/windows/win_ping.ps1
<my_machine> ESTABLISH WINRM CONNECTION FOR USER: Administrator on PORT 5986 
TO my_machine
<my_mahcine> WINRM CONNECT: transport=ssl endpoint=https:
//my_machine:5986/wsman
<my_machine> WINRM CONNECTION ERROR: 500 WinRMTransport. [Errno 111] 
Connection refused
Traceback (most recent call last):
  File 
"/usr/lib/python2.6/site-packages/ansible-2.2.0-py2.6.egg/ansible/plugins/connection/winrm.py"
, line 152, in _winrm_connect
    self.shell_id = protocol.open_shell(codepage=65001) # UTF-8
  File "/usr/lib/python2.6/site-packages/winrm/protocol.py", line 121, in 
open_shell
    rs = self.send_message(xmltodict.unparse(rq))
  File "/usr/lib/python2.6/site-packages/winrm/protocol.py", line 193, in 
send_message
    return self.transport.send_message(message)
  File "/usr/lib/python2.6/site-packages/winrm/transport.py", line 138, in 
send_message
    raise WinRMTransportError('http', ex.reason)
WinRMTransportError: 500 WinRMTransport. [Errno 111] Connection refused


my_machine | UNREACHABLE! => {
    "changed": false,
    "msg": "ssl: 500 WinRMTransport. [Errno 111] Connection refused",
    "unreachable": true
}


Host file:

[windows]
my_machine

Yaml file:


ansible_user: Administrator
ansible_pass: my_pass
ansible_port: 5986
ansible_connection: winrm
ansible_winrm_server_cert_validation: ignore


Regards,
Mahi

-- 
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/d8721d5b-9d02-4dba-843c-4064bc4075db%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to