---
- name: Wait until SSH is available
hosts: all
become: false
gather_facts: false
tasks:
wait_for:
host: "{{ ansible_host }}"
port: 22
timeout: 240
delegate_to: localhost