Not sure if i'm using the wait_for module correctly on two windows host. I'm getting the error below when trying to check if a port is open from a source windows host to a target windows host.
Wondering if i'm using the module correctly or if this even possible when both hosts are windows. I've tried the same playbook on two unix host and it worked.
---
- hosts: win-host1
tasks:
- wait_for:
host: 192.168.70.13
port: 9443
timeout: 10
ignore_errors: true
register: result
- debug: var=result
PLAY [win-host1] ***********************************************************************************************************************************************************************
TASK [Gathering Facts] *******************************************************************************************************************************************************************************
ok: [win-host1]
TASK [wait_for] **************************************************************************************************************************************************************************************
[WARNING]: FATAL ERROR DURING FILE TRANSFER: Traceback (most recent call last): File "/usr/lib/python2.6/site-packages/ansible/plugins/connection/winrm.py", line 276, in _winrm_exec
self._winrm_send_input(self.protocol, self.shell_id, command_id, data, eof=is_last) File "/usr/lib/python2.6/site-packages/ansible/plugins/connection/winrm.py", line 256, in _winrm_send_input
protocol.send_message(xmltodict.unparse(rq)) File "/usr/lib/python2.6/site-packages/winrm/protocol.py", line 207, in send_message return self.transport.send_message(message) File
"/usr/lib/python2.6/site-packages/winrm/transport.py", line 202, in send_message raise WinRMTransportError('http', error_message) WinRMTransportError: (u'http', u'Bad HTTP response returned
from server. Code 500')
fatal: [win-host1]: FAILED! => {"msg": "winrm send_input failed"}
...ignoring
TASK [debug] *****************************************************************************************************************************************************************************************
ok: [win-host1] => {
"result": {
"failed": true,
"msg": "winrm send_input failed"
}
}
PLAY RECAP *******************************************************************************************************************************************************************************************
win-host1 : ok=3 changed=0 unreachable=0 failed=0