wait_for_connection with 2.2 and/or wait_for with a bastion host?

I’m attempting to reboot a Linux host and wait for it to become available again. I’ve followed the ideas in both the docs (https://docs.ansible.com/ansible/wait_for_module.html) and https://github.com/ansible/ansible/issues/14413 and it “works”, however my situation is slightly different, as I have a bastion/relay host between me and the remote host (in a private OpenStack cloud). So my wait_for ends up waiting the entire delay+timeout (15+60 seconds) time (and then succeeding, for some reason), despite the fact that the machine rebooted in <15 seconds.

For a variety of reasons, I’m stuck using the “official” RPMs out of EPEL, which are currently at Ansible 2.2.1, but I just noticed that there is a “wait_for_connection” module in 2.3 that sounds like exactly what I need. Is there any way to emulate this functionality with “wait_for” given that I’ve got a non-routable node and have to go through a bastion host?

Thanks,
-Mike

Ansible 2.3 is in EPEL testing.

However, to use wait_for you should also use delegate_to and delegate the execution of the task to the bastion, so that wait_for is running from the bastion.