"It is that repetition that Ansible cannot currently handle." I'm not sure that's true.
Ansible has loops and things like with_sequence, as well as do_until loops. On Thu, Jun 26, 2014 at 1:20 PM, 'Petros Moisiadis' via Ansible Project < [email protected]> wrote: > On 06/26/14 19:58, Michael DeHaan wrote: > > "Adding some details: > 1. node A is running some java app > 2. node B is running another app which in turn can generate some 'load' > for node A > > in terms of states I need not only have app 'started' on node A but also > have it 'warmed up'. as warming up a java process is a complex task the > only way to put app in 'warmed up' state is to organize feedback loop > between A and B and stop warmup runs (on B) as soon as number of > compiled/recompiled methods by hotspot drops to certain level. At this > point you'll get some 'confidence' that app is warmed up and you can > proceed further > > ansible has a way of repeating single task but for some (may be good) > reason there is no way of repeating 'composite task' (which is what roles > are to my understanding) " > > - hosts: java > tasks: > - # steps to wait for it to be started > > - hosts: load_generators > tasks: > - # steps to generate load against java boxes, using delegate_to: "{{ > item }}" and with_items: groups.java ? > > > > This does not seem to be a solution to his problem. What he actually needs > is a way to repeat a number of different, load generating tasks on host B > until his java app on host A has been warmed up for good. It is that > repetition that Ansible cannot currently handle. > > > > > > On Thu, Jun 26, 2014 at 12:34 PM, Jerome Wagner <[email protected]> wrote: > >> Hello, >> >> I haven't tried it but maybe you can loop over an 'include' task ? have >> you tried it already ? >> >> - include: warmup.yml >> register: result >> until: result.stdout.find("all systems go") != -1 >> retries: 5 >> delay: 10 >> >> >> >> Le jeudi 26 juin 2014 18:25:55 UTC+2, Nick Evgeniev a écrit : >> >>> Adding some details: >>> 1. node A is running some java app >>> 2. node B is running another app which in turn can generate some 'load' >>> for node A >>> >>> in terms of states I need not only have app 'started' on node A but >>> also have it 'warmed up'. as warming up a java process is a complex task >>> the only way to put app in 'warmed up' state is to organize feedback loop >>> between A and B and stop warmup runs (on B) as soon as number of >>> compiled/recompiled methods by hotspot drops to certain level. At this >>> point you'll get some 'confidence' that app is warmed up and you can >>> proceed further >>> >>> ansible has a way of repeating single task but for some (may be good) >>> reason there is no way of repeating 'composite task' (which is what roles >>> are to my understanding) >>> >>> On Wednesday, 25 June 2014 19:20:37 UTC-5, Michael DeHaan wrote: >>>> >>>> >>>> I would benefit by a more specific example so I can understand what >>>> you mean. >>>> >>>> >>>> On Wed, Jun 25, 2014 at 5:13 PM, Nick Evgeniev <[email protected]> >>>> wrote: >>>> >>>>> yep. exactly the case. at the moment this logic is implemented using >>>>> .sh script.. so looks like the best option is to mix .sh with ansible (for >>>>> pure deployment tasks). Will take a look into Fabric .. though I'd like to >>>>> avoid introducing new tool for every simple task :) >>>>> >>>>> >>>>> On Wednesday, 25 June 2014 16:01:57 UTC-5, Dmitry Makovey wrote: >>>>>> >>>>>> does that mean you're running cross-host function that takes params >>>>>> from A and B and returns value on B? And you expect certain value on B >>>>>> before you move forward? I'm not an expert but it doesn't seem to be >>>>>> Ansible domain. Maybe Fabric would be a better fit? >>>>>> >>>>> -- >>>>> 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/63014730-309e-44a9-b2c6-400b9a7d5388%40googlegroups.com >>>>> <https://groups.google.com/d/msgid/ansible-project/63014730-309e-44a9-b2c6-400b9a7d5388%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/b19d8e1d-db1a-4d82-8e82-ab17209767cb%40googlegroups.com >> <https://groups.google.com/d/msgid/ansible-project/b19d8e1d-db1a-4d82-8e82-ab17209767cb%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/CA%2BnsWgyiE4zPtS%3DBBr02QJL9HEP%3DFZLdnncxWDRCSsQ8HbXGPw%40mail.gmail.com > <https://groups.google.com/d/msgid/ansible-project/CA%2BnsWgyiE4zPtS%3DBBr02QJL9HEP%3DFZLdnncxWDRCSsQ8HbXGPw%40mail.gmail.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/53AC5662.3090801%40yahoo.gr > <https://groups.google.com/d/msgid/ansible-project/53AC5662.3090801%40yahoo.gr?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/CA%2BnsWgycGhiLGTS0wn6-FJywp1KKzxo3MevNd%3DyjNb17xGbJWQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
