wait_for_connection

Collection: builtin

Full Name: wait_for_connection

Aliases: ansible.builtin.wait_for_connection

Controller module — runs on the local controller, not on remote hosts.

Synopsis

Wait until the target accepts a connection and can run modules

Parameters

NameTypeRequiredDefaultDescription
timeoutint600Maximum number of seconds to wait for a connection
delayint0Number of seconds to wait before starting to poll
sleepint1Number of seconds to sleep between checks
connect_timeoutint5Maximum number of seconds to wait for each connection attempt

Example

- name: Wait for the host to come back after a reboot
  wait_for_connection:
    delay: 10
    timeout: 600