Ansible: complete a failed task

I am writing a book. My workflow is as follows:

  • add task or several tasks
  • run playbook
  • if it fails: change something and return to the previous step

If the tutorial is long enough, it takes a long time to start the game. Is there a way to run only the last (unsuccessful) task? or Can you suggest another way to speed up the process of creating playlists?

+6
source share
1 answer

You can use the --start-at-task ansible-playbook

 --start-at-task=START_AT start the playbook at the task matching this name 

Another option is to use the --step parameter, which allows you to go through the --step and decide what to do.

+7
source

All Articles