Hi Jonin, Sound like you have something like this and you want to group and batch the hosts?
--- name: first webservers play hosts: Webservers tasks name: Nodes play hosts: nodes tasks name: Post nodes tasks hosts: webservers tasks If I'm not misunderstanding that sounds like you want rolling updates. Have you looked at this page yet? https://docs.ansible.com/ansible/latest/user_guide/guide_rolling_upgrade.html On Sat, Aug 22, 2020 at 4:47 AM jonin <sebastian.coll...@gmail.com> wrote: > Hi, > > I have a playbook which is running against this type of structured > inventory file > > # Ansible Inventory > [webservers] > host1 > host2 > > [nodes] > host3 > host4 > > [all:vars] > ############################# > > The playbook needs to effectively run three plays in this order which it > is doing: > 1. Do stuff to Webservers > 2. Do stuff tot Nodes > 3. Do stuff to webservers > > Currently when I run this playbook there is a complete outage on all > hosts as plays are executed. > > I want to be able to run my playbook so that there is only a partial > outage i.e. first running the entire play against Webserver1(host1) > /node1(host3) before repeating the same steps against > webserver2(host2)/node2(host4). > > I have read about the use of serial but I think this would only help for > orchestrating the order of execution within a play as opposed to whole > playbook? > > Any help much appreciated. > > -- > You received this message because you are subscribed to the Google Groups > "Ansible Development" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to ansible-devel+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/ansible-devel/86a40246-37f1-4cb4-a5dd-10cd2540dd05n%40googlegroups.com > <https://groups.google.com/d/msgid/ansible-devel/86a40246-37f1-4cb4-a5dd-10cd2540dd05n%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "Ansible Development" group. To unsubscribe from this group and stop receiving emails from it, send an email to ansible-devel+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-devel/CAJ7P4uipnVobcuoG0aSA6UTJib5DJ-sV38OQUnNDsoqS91x0Fw%40mail.gmail.com.