.. _wait_for: wait_for `````````````````````````````` .. versionadded:: 0.7 This is useful for when services are not immediately available after their init scripts return - which is true of certain Java application servers. It is also useful when starting guests with the ``virt`` module and needing to pause until they are ready. .. raw:: html
parameter | required | default | choices | comments |
---|---|---|---|---|
delay | no | number of seconds to wait before starting to poll | ||
host | no | 127.0.0.1 | hostname or IP address to wait for | |
port | yes | port number to poll | ||
timeout | no | 300 | maximum number of seconds to wait for | |
state | no | started |
|
either started , or stopped depending on whether the module should poll for the port being open or closed. |
Example from Ansible Playbooks
wait_for port=8000 delay=10