W
W
WhiteStars2015-11-04 16:29:04
Ansible
WhiteStars, 2015-11-04 16:29:04

How in Ansible to restart the playbook only on those hosts on which an error occurred during processing?

Please tell me with what commands it is necessary to restart the playbook only for those hosts on which errors occurred. Let's say I have 200 hosts, out of 200, 30 worked with errors, for example, due to lack of communication. In such cases, I created a separate Tasks list that included these 30 hosts, and restarted the playbook with this list of hosts. Is it possible to somehow specify forced processing in the playbook? Suppose if ansible does not reach some host out of 200 hosts, after a few minutes it will again try to reach them and execute the script on them. I would be very grateful for any ideas and tips!

Answer the question

In order to leave comments, you need to log in

2 answer(s)
K
Konstantin Rudenkov, 2015-11-10
@WhiteStars

If I remember correctly, a .retry file is created in the hamster (or in the launch directory). Run with --limit $path_to_retry_file key.

P
Puma Thailand, 2015-11-05
@opium

well, make scripts so that they can be run a second time on any host without problems

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question