V
V
Venot2020-07-10 14:13:42
Jenkins
Venot, 2020-07-10 14:13:42

How to run playbook in parallel in jenkins?

there is a pipeline in which the host groups are selected (everything is written to a variable, the script processes), and then the playbook is launched where this variable is passed to hosts (in the form of an array), applications are restarted there, and how to do it in order not to wait for execution on one, but do a parallel run? you can change it as a playbook or by means of jenkins.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
P
Puma Thailand, 2020-07-10
@opium

it is initially clear what you have done through the ass, it is better to try to change the implementation itself than to fence such a tin
feeling that you do not understand what ci is and use it very wrong

M
MaxKozlov, 2020-07-10
@MaxKozlov

And how restart tasks are started?
You can try choosing what to restart with systemd or service via loop . and instead of collecting groups, collect variables with service names for each host
Well, or come up with something similar for other restart methods

A
alfss, 2020-07-11
@alfss

ansible has the concept of an execution strategy, look at the documentation on this topic

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question