Can Ansible pause on errors, allowing user to intervene, then proceed?

When initially trying to get an elaborate playbook to work, it’s very costly to repeat the process when a single task fails.

I’d like the playbook to automatically pause on a task that I haven’t set ignore_errors: True on, let me manually do what the task intended to do, then let the playbook abort that particular task and continue. This way I can make an presumptive fix to the failing task, but let Ansible continue with the rest of the tasks, without having to re-run the playbook for every single error.

Are using retry files the right way to do this, or is there another way?

  • Neil

--start-at-task

https://docs.ansible.com/ansible/playbooks_startnstep.html

Johannes

You have a couple of options --step allows you to ‘step through’ each task, in 2.1 you also get the ‘debug’ strategy which is much closer to what you seem to want.

Using --start-at-task won’t work because it won’t inherit the state from the beginning of the playbook. So facts that were set earlier will be undefined.

What happens when using --step and a task fails, does the whole playbook abort?

The debug strategy looks like the ideal solution. when is Ansible 2.1 going to be released to Pip?