## The problem
Issue ansible/ansible#80514 (closed, 17 comments): ### Summary I use `wait_for_connection` with `delegate_to: [IP]` to wait the ssh connection on host. But in the host, the ssh daemon is not UP immediately (this is why I use `wait_for_connection`). In this case, although the ssh daemon ends up being UP after few seconds, the task `wait_for_connection` fails (timeout). ### Issue Type Bug Report ### Component Name wait_for_connection ### Ansible Version ```console $ ansible --version ansible [core 2.14.4] config file = /tmp/test/ansible.cfg configured module search path = ['[HOME]/...', '/usr/share/ansible/plugins/module

## The fix
wait_for_connection failing with delegate_to when SSH is temporarily down was resolved in ansible-core 2.17+ (commit 86fd702, duplicate of #78264). Upgrade. Separately, if your Python interpreter changes mid-play, run `- meta: clear_facts` before wait_for_connection (and gather_facts after) to fix interpreter-mismatch failures.

## Notes
Thread: https://github.com/ansible/ansible/issues/80514. Verified against the closed issue and the maintainer/accepted answer there.