37 lines
No EOL
1.8 KiB
Markdown
37 lines
No EOL
1.8 KiB
Markdown
# ansible.builtin.pause
|
|
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.
|
|
|
|
## Parameter
|
|
| Parameter | Type | Default | Description |
|
|
| ----------- | ------- | ------- | ------------------------------------------------------------ |
|
|
| **echo** | boolean | true | Controls whether or not keyboard input is shown when typing. |
|
|
| **minutes** | integer | - | A positive number of minutes to pause for. |
|
|
| **prompt** | string | - | Optional text to use for the prompt message. |
|
|
| **seconds** | integer | - | A positive number of seconds to pause for. |
|
|
|
|
## Return Values
|
|
| Value | Type | When | Description |
|
|
| -------------- | ------ | ---------------------- | ----------------------------------- |
|
|
| **delta** | string | always | Time paused in seconds |
|
|
| **start** | string | always | Time when started pausing |
|
|
| **stop** | string | always | Time when ended pausing |
|
|
| **user_input** | string | if no waiting time set | User input from interactive console |
|
|
|
|
## Examples
|
|
```yaml
|
|
- name: Pause for 5 minutes to build app cache
|
|
ansible.builtin.pause:
|
|
minutes: 5
|
|
|
|
- name: Pause until you can verify updates to an application were successful
|
|
ansible.builtin.pause:
|
|
|
|
- name: A helpful reminder of what to look out for post-update
|
|
ansible.builtin.pause:
|
|
prompt: "Make sure org.foo.FooOverload exception is not present"
|
|
|
|
- name: Pause to get some sensitive input
|
|
ansible.builtin.pause:
|
|
prompt: "Enter a secret"
|
|
echo: no
|
|
``` |