# Using the wait\_for module to check ports from one windows host to another windows host

**URL:** <https://forum.ansible.com/t/using-the-wait-for-module-to-check-ports-from-one-windows-host-to-another-windows-host/26929>\
**Category:** Ansible Project\
**Tags:** windows\
**Created:** [March 8, 2018, 4:24am UTC](https://forum.ansible.com/t/using-the-wait-for-module-to-check-ports-from-one-windows-host-to-another-windows-host/26929 "2018-03-08T04:24:24Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![marcalfa1](https://avatars.discourse-cdn.com/v4/letter/m/cdc98d/32.png) [@marcalfa1](https://forum.ansible.com/u/marcalfa1)\
**Post date:** [March 8, 2018, 4:24am UTC](https://forum.ansible.com/t/using-the-wait-for-module-to-check-ports-from-one-windows-host-to-another-windows-host/26929/1 "2018-03-08T04:24:24Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![jborean](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/jborean/32/1525_2.png) [@jborean](https://forum.ansible.com/u/jborean)\
**Post date:** [March 8, 2018, 5:38am UTC](https://forum.ansible.com/t/using-the-wait-for-module-to-check-ports-from-one-windows-host-to-another-windows-host/26929/2 "2018-03-08T05:38:30Z")

</div>

The wait\_for module is a Python module and can’t be run on a Windows host. You can either delegate to the localhost (Ansible controller) and run it from there, or use the win\_wait\_for module which was added in Ansible 2.4 [https://docs.ansible.com/ansible/2.4/win\_wait\_for\_module.html](https://docs.ansible.com/ansible/2.4/win_wait_for_module.html).

Thanks

Jordan
