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
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| timeout | int | 600 | Maximum number of seconds to wait for a connection | |
| delay | int | 0 | Number of seconds to wait before starting to poll | |
| sleep | int | 1 | Number of seconds to sleep between checks | |
| connect_timeout | int | 5 | Maximum 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