What you should do is have one playbook with three included play files in it.
Apply configuration to play1 and play2, then against "all" hosts you can apply the "switch_to_new" roles. Though it does sound like you might want to investigate load balancers. On Mon, Mar 17, 2014 at 3:29 AM, Ilya Averyanov <[email protected]>wrote: > Hello, > > I have some problems with organising my application deploy setup: I have > pretty different playbooks for different groups of hosts, but these > playbooks have a few common roles which execution should be synchronised > through servers from all groups (db update, restart with new configs etc). > This is required because it's important that different parts of application > work with the same data; also it's important for all users to see any > changes at once. > > I see that servers from different playbooks are updated consequently; even > if they could be updated simultaneously, I can't find any tool for > synchronisation. > > Example: > > palybook1: > > - hosts: group1 > roles: > - some_stuff > - migrate_data > - some_more_stuff > - switch_to_new > > playbook2: > > - hosts: group2 > roles: > - some_other_stuff > - migrate_data > - some_more_other_stuff > - switch_to_new > > Roles migrate_data and switch_to_new should be executed simultaneously > for the whole union of group1 and group2 servers. > > > Is there a natural, idiomatic way in which this problem could be solved? > > -- > You received this message because you are subscribed to the Google Groups > "Ansible Project" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/ansible-project/e459ff87-487c-41e1-b5f7-15b1f6b3efa1%40googlegroups.com<https://groups.google.com/d/msgid/ansible-project/e459ff87-487c-41e1-b5f7-15b1f6b3efa1%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAEVJ8QNTocfz22aEB%3D%3DHYf7BmfwU0oOa6jM8n9F%2BV1K%3D07k2mg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
