Dear all,
I know that by setting "serial: 1" in a play I can make sure that only
one host is being changed at a time. This overrides the forks setting.
But both settings are either global (forks) or per-play. I need
something like this for a group of servers. I do not want to maintain
a duplicate repository where all my playsbooks container "serial: 1"
just for that group.
Is it possible to achieve something similar on a group_var basis?
Thanks in advance.
Johannes
I think you sort of answered your own question - serial: is related to
a given play,
so if that play is targeted against a group then tasks against thet
group will complete
on each server before the next one starts.A good example is bouncing
servers while
leaving enough active to keep your load balancer happy
I've always thought of forks as more to do with the ansible control
host; if things can
run in parallel they will, and you can safely ramp that up as high as
you like as long
as the control host has enough resources. This pays off well for e.g.
package installs.
I might be missing something about your use case; why wouldn't you always want
a serial: tagged play to run - well, serially?
Because I just have one group of hosts that seems to need running with
serial:1, but I do not want to handle all of my hosts that way.
But as ansible seems to be missing a possibility to switch this on/off
just for one call or run, I might end up having to use serial in all
of my plays...
Johannes