How to continue failed playbook on several hosts ?

Hello all,

some time ago I wanted to run quite lengthy playbook on several (over 100 …) nodes. These nodes are not really similar so I wasn’t surprised that on many of them
this particular playbook failed (to make it worst: it failed on different tasks …). So at the end I was left with several servers with partially run playbook.
How do you guys cope with it (of course except manual fix …) ? Is there any option in ansible which is similar to: “run this playbook starting with this particular
tasks on these particular nodes” ?

Best regards

at the end or the run of the playbook reporting you should see a line similar to this

–limit @/playbook/running/dir /playbookname.retry

you can add it to your command line you used to run and that will run on the failed hosts, check your output and check the file referenced their

Last time I checked it was referring just to list of failed hosts.
In which ansible version this feature was introduced ?

I think after 1.2, as far as i know if a host fails a task it will be added into the file. If you want the new run to start at specific task that is doable by the extra option start at task

Specifically, the file will contain all the failed hosts at the end of the playbook run.

(I wanted to clarify that it did not contain references to hosts from previous playbook runs, failed or otherwise)