AnsiblePilot — Master Ansible Automation

AnsiblePilot is the leading resource for learning Ansible automation, DevOps, and infrastructure as code. Browse over 1,100 tutorials covering Ansible modules, playbooks, roles, collections, and real-world examples. Whether you are a beginner or an experienced engineer, our step-by-step guides help you automate Linux, Windows, cloud, containers, and network infrastructure.

Popular Topics

About Luca Berton

Luca Berton is an Ansible automation expert, author of "Ansible for VMware by Examples" and "Ansible for Kubernetes by Example" published by Apress, and creator of the Ansible Pilot YouTube channel. He shares practical automation knowledge through tutorials, books, and video courses to help IT professionals and DevOps engineers master infrastructure automation.

Ansible pause Module: Wait, Prompt, and Delay Execution (Complete Guide)

By Luca Berton · Published 2024-01-01 · Category: database-automation

How to use Ansible pause module to wait, prompt for input, and add delays. Interactive confirmations, timed pauses, and user prompts with playbook examples.

Ansible pause Module: Wait, Prompt, and Delay Execution (Complete Guide)

The ansible.builtin.pause module pause playbook execution. This guide covers all common use cases with practical playbook examples.

Timed Pause

Prompt for Confirmation

Pause Until Enter

FAQ

How do I add a delay in Ansible?

Use ansible.builtin.pause: seconds=30 for a timed delay. For user interaction, use prompt to wait for Enter or capture input with register.

How do I prompt for user input in Ansible?

Use ansible.builtin.pause: prompt="Your question" with register: result. Access the input via result.user_input. For pre-play prompts, use vars_prompt instead.

Conclusion

The ansible.builtin.pause module is a versatile tool for pause playbook execution. Use the examples above as starting points and adapt them to your infrastructure needs.

Related ArticlesAnsible Playbook GuideAnsible wait_for Module

Category: database-automation

Browse all Ansible tutorials · AnsiblePilot Home