When I first started ansible, one of the things I wanted it to be
exceptionally good at is multi-machine rollouts, where there are
various tiers of application architecture. This is why you can do
different hosts in different plays and why it is push based -- so you
have really fine grained control about what machines you talk to when.
One of the things that doesn't quite fall into this model though is
when you have to talk to monitoring servers or load balancers. Until
today.
Generally speaking, the new option on a task 'delegate_to', allows a
command to be run on a specified address with reference to the address
of each host selected in the play. This is one of the last missing
pieces missing to orchestrate some pretty impressive steps.
The follow up to this feature, by the way, is going to be the ability to mark a playbook as “serial: True”, which means it will entirely complete a play
on a single host, before moving on to the next set.
This will probably respect the --forks flag for how many to do at once.
Is there a way to mark a particular task as “serial”? The ticket below appears to be resolved but by its description looks like this can set a “playbook” as serial (the entire playbook instead of just a particular task? In which case should I create a different playbook for this task (is that the intended workflow) or maybe that fix isn’t in the version I’m on (1.3.4) getting this error when I try to add serial to a task:
ERROR: serial is not a legal parameter in an Ansible task or handler