pause - Pause playbook execution
Synopsis
- Pauses playbook execution for a set amount of time, or until a prompt is acknowledged. All parameters are optional. The default behavior is to pause with a prompt.
- To pause/wait/sleep per host, use the wait_for module.
- You can use
ctrl+c
if you wish to advance a pause earlier than it is set to expire or if you need to abort a playbook run entirely. To continue early pressctrl+c
and thenc
. To abort a playbook pressctrl+c
and thena
. - The pause module integrates into async/parallelized playbooks without any special considerations (see Rolling Updates). When using pauses with the
serial
playbook parameter (as in rolling updates) you are only prompted once for the current group of hosts. - This module is also supported for Windows targets.
Options
parameter | required | default | choices | comments |
---|---|---|---|---|
minutes | no | A positive number of minutes to pause for. | ||
prompt | no | Optional text to use for the prompt message. | ||
seconds | no | A positive number of seconds to pause for. |
Examples
# Pause for 5 minutes to build app cache. - pause: minutes: 5 # Pause until you can verify updates to an application were successful. - pause: # A helpful reminder of what to look out for post-update. - pause: prompt: "Make sure org.foo.FooOverload exception is not present"
Return Values
Common return values are documented here Return Values, the following are the fields unique to this module:
name | description | returned | type | sample |
---|---|---|---|---|
delta | Time paused in seconds | always | string | 2 |
start | Time when started pausing | always | string | 2017-02-23 14:35:07.298862 |
stdout | Output of pause module | always | string | Paused for 0.04 minutes |
stop | Time when ended pausing | always | string | 2017-02-23 14:35:09.552594 |
user_input | User input from interactive console | if no waiting time set | string | Example user input |
Notes
Note
- Starting in 2.2, if you specify 0 or negative for minutes or seconds, it will wait for 1 second, previously it would wait indefinitely.
- This module is also supported for Windows targets.
Status
This module is flagged as stableinterface which means that the maintainers for this module guarantee that no backward incompatible interface changes will be made.
Maintenance Info
For more information about Red Hat’s this support of this module, please refer to this knowledge base article<https://access.redhat.com/articles/rhel-top-support-policies>
For help in developing on modules, should you be so inclined, please read Community Information & Contributing, Testing Ansible and Developing Modules.
© 2012–2018 Michael DeHaan
© 2018–2019 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/2.4/pause_module.html