Hi Michael DeHaan , I am just getting started with Ansible and would appreciate if you can give an example of shell script to background playbacks for executing them in parallel.
Regards Rahul Mehrotra On Friday, 26 July 2013 06:26:57 UTC-7, Michael DeHaan wrote: > > Yeah see the last half of my email above. > > The playbooks would not be in parallel, which is why you need the shell > script or that future jobs feature. > > > > > On Thu, Jul 25, 2013 at 11:31 AM, Kavin Kankeshwar <[email protected] > <javascript:>> wrote: > >> Yes, I dont want entire tasks in playbook to be async. I want current >> default behavior in the playbook. >> >> But when 1 playbook, when i >> >> - include: playbookB.yml >> - include: playbookC.yml >> >> Both should be triggered in parallel, But tasks in both playbook will >> work as they do now. Do you think this would be possible? >> >> For now ill probably use the shell script idea. >> >> Regards, >> -- >> Kavin.Kankeshwar >> >> >> >> On Thu, Jul 25, 2013 at 7:07 AM, Michael DeHaan <[email protected] >> <javascript:>> wrote: >> >>> Ok so right now you can't have a playbook that sets "async: True" as the >>> default for every task in it (ditto for async_poll). I am totally fine >>> for patches that allow this as a playbook option though and then it would >>> set any tasks that didn't have it set. >>> >>> We already do this for sudo/sudo_user/etc. However it's not true that >>> the playbook itself would occur serially, you would be starting task 1, 2, >>> 3, etc with no wait. >>> If you want the playbooks to all go parallel, that's different. >>> >>> AWX is not going to offer this in the 1st release in a few weeks, but >>> it's something I'm looking to build in a follow on, so allow jobs to spawn >>> child jobs in parallel. >>> >>> Alternatively you can do that now by a shell script that backgrounds >>> some processes and waits on the PIDs, though the above is going to be a lot >>> cleaner. >>> >>> >>> >>> >>> >>> On Thu, Jul 25, 2013 at 2:18 AM, Kavin Kankeshwar <[email protected] >>> <javascript:>> wrote: >>> >>>> Hi, >>>> >>>> For one of my use cases, I would like to trigger multiple playbook >>>> simultaneously, but in the playbook all the tasks will be serial, i.e. >>>> Playbook 1, 2, 3 will be triggered simultaneously, but Tasks 2 in Playbook >>>> 1, will wait for task 1 to complete and so on. >>>> >>>> I know i can mark each long running task as fire-forget, But in this >>>> particular case, Tasks are dependent, So task 2 needs something from task >>>> 1. So playbook will be long running. >>>> >>>> Would be nice if i can have a master playbook and include other >>>> playbooks in fire-forget mode. >>>> >>>> Please let me know if there are any hacks or better method i can use to >>>> achieve the above goal ? >>>> >>>> Regards, >>>> -- >>>> Kavin.Kankeshwar >>>> >>>> >>>> >>>> -- >>>> 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] <javascript:>. >>>> For more options, visit https://groups.google.com/groups/opt_out. >>>> >>>> >>>> >>> >>> >>> >>> -- >>> Michael DeHaan <[email protected] <javascript:>> >>> CTO, AnsibleWorks, Inc. >>> http://www.ansibleworks.com/ >>> >>> -- >>> 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] <javascript:>. >>> For more options, visit https://groups.google.com/groups/opt_out. >>> >>> >>> >> >> -- >> 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] <javascript:>. >> For more options, visit https://groups.google.com/groups/opt_out. >> >> >> > > > > -- > Michael DeHaan <[email protected] <javascript:>> > CTO, AnsibleWorks, Inc. > http://www.ansibleworks.com/ > > -- 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/dbbd65b5-5fc4-4ec6-816b-78936870426d%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
