I tried to ping windows server from ansible, and getting the below error:
$ ansible windows -m win_ping -vvvv
<windowsserver.cloudapp.net> ESTABLISH WINRM CONNECTION FOR USER: windowsuser on PORT 5986 TO windowsserver.cloudapp.net
<windowsserver.cloudapp.net> WINRM CONNECT: transport=plaintext endpoint=https://windowsserver.cloudapp.net:5986/wsman
<windowsserver.cloudapp.net> WINRM CONNECTION ERROR: 500 WinRMTransport. [Errno -2] Name or service not known
<windowsserver.cloudapp.net> WINRM CONNECT: transport=plaintext endpoint=http://windowsserver.cloudapp.net:5986/wsman
<windowsserver.cloudapp.net> WINRM CONNECTION ERROR: 500 WinRMTransport. [Errno -2] Name or service not known
windowsserver.cloudapp.net | FAILED => 500 WinRMTransport. [Errno -2] Name or service not known
I have correct host under inventories/hosts file, and windows user/pass under group_vars/windows.yml
It worked fine earlier some time back, but has name or service not known error. where might be the issue?