Cool Ansible 2 - Get User Input During Execution
The pause
module can stop execution for an amount of time or wait for the user to hit Return. One of its return parameters is user_input
which makes it great for getting variables or confirming actions during task execution. In this example, we ask the user to confirm that they want to delete an important file. The deletion task will be only be run when the user explicitly types yes
or true
.