Thanks Brian, that looks like it could work. I'm not sure I like doing a small refactor for this though. Plus I still have to copy the 'role:' sections. Eh.. I'll think of something. Thanks!
On Tue, Dec 16, 2014 at 9:33 PM, Brian Coca <[email protected]> wrote: > > so I think you need 4 plays, make the tasks into their own files, use > - include in all plays, you have the same tasks but use the different > plays for each of the different needs. > > plays 1,2,3 as you have now, play 4, with serial: 1, uses tasks from > play 1, 2 and 3 in order. > > On Tue, Dec 16, 2014 at 1:48 PM, Hagai Kariti <[email protected]> wrote: > > That won't help me. If i have one play to remove a node from a cluster, > one > > to shut it down and one to provision a new one, i need the tasks in all > of > > them to run for each host. Removing all nodes, then shutting them all > down, > > etc isn't good. > > > > Ideally I'd have one task for each. But when that task is a play by > itself, > > that's where my problem is. > > > > On Dec 16, 2014 8:36 PM, "Michael DeHaan" <[email protected]> wrote: > >> > >> Sounds like you are looking for a flag to override --serial to me, which > >> may be reasonable. > >> > >> In the meantime, can you just set serial: 1 on each play? > >> > >> On Tue, Dec 16, 2014 at 12:57 PM, kesten broughton > >> <[email protected]> wrote: > >>> > >>> +1 > >>> I have this problem a lot when I use delegate_to with multiple targets > >>> making a request of a single delegate. Lock conflicts cause > intermittent > >>> failure. > >>> > >>> > >>> On Tuesday, December 16, 2014 9:41:04 AM UTC-6, Hagai Kariti wrote: > >>>> > >>>> Hi > >>>> I'm running a deployment that consists of different plays, some of > which > >>>> are already written that I would like to reuse. There's about one one > play > >>>> for each stage: > >>>> > >>>> 1) Remove server from cluster > >>>> 2) Shut down the server > >>>> 3) Provision a new server to replace it > >>>> > >>>> When running, I need each set of plays to run on one server at a time, > >>>> so setting 'serial' on the play level isn't enough. I know I can run > another > >>>> ansible-playbook instance with the command module, but then I > wouldn't see > >>>> the progress for each play. I guess I can copy-paste my existing > playbooks > >>>> and play with delegate_to to achieve what I want, but that feels > wrong. What > >>>> I'm doing currently is splitting my playbook run to several pieces and > >>>> gluing them with bash, looping when necessary on a single playbook. > >>>> > >>>> It feels like Ansible doesn't support this use case well currently. Is > >>>> there a better way to solve that than using bash? Are there features > in the > >>>> pipeline to help with this case? > >>>> > >>>> Thanks a lot! > >>>> > >>>> > >>> -- > >>> 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/dc2cc05f-f534-41b6-836e-a6b73cfaa298%40googlegroups.com > . > >>> > >>> For more options, visit https://groups.google.com/d/optout. > >> > >> -- > >> You received this message because you are subscribed to a topic in the > >> Google Groups "Ansible Project" group. > >> To unsubscribe from this topic, visit > >> > https://groups.google.com/d/topic/ansible-project/TEI_QTbjV6Y/unsubscribe. > >> To unsubscribe from this group and all its topics, 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/CA%2BnsWgymEfmR18H0NVVWeA1T%3Dz0H77vLLDPQ3f0y6g20-jZXRg%40mail.gmail.com > . > >> 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/CAO0%3DbmHtH1ZywazJhCGLpoRPacQ1U-13Yjqcy3EUDpgNFJo1Eg%40mail.gmail.com > . > > > > For more options, visit https://groups.google.com/d/optout. > > > > -- > Brian Coca > > -- > You received this message because you are subscribed to a topic in the > Google Groups "Ansible Project" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/ansible-project/TEI_QTbjV6Y/unsubscribe. > To unsubscribe from this group and all its topics, 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/CAJ5XC8mGVNE_jD4sTMkXNkOxChw90meTHj5QgNbq4PR1fmq0_g%40mail.gmail.com > . > 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/CAO0%3DbmGE1oj4uOkq1nRdrbwUW%3D1apa%3D7qS1vcPgJ7jXQ1%2BJ8KQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
