See the discussion here for some other ideas:

https://github.com/ansible/proposals/issues/31

On Tuesday, August 7, 2018 at 12:12:32 PM UTC+1, Karl Auer wrote:
>
> If you can't place the tasks in different playbooks, then they are not 
> truly independent. Why can you not use separate playbooks?
>
> Also, you could use tags to achieve something similar. Tag your tasks "a", 
> "b", "c" etc, then:
>
> ansible-playbook [...opts...] 
> all
> .yml -t a > a.out 2>&1 &
> ansible-playbook [...opts...] 
> all
> .yml -
> t b 
> > b.out 2>&1 &
> ansible-playbook [...opts...] 
> all
> .yml -
> t c 
> > c.out 2>&1 &
> ansible-playbook [...opts...] 
> all
> .yml -
> t d 
> > d.out 2>&1 &
> Or, again, in separate terminals. The above is scriptable of course.
>
> If you are using bash, you might like to investigate the "coproc" and 
> "wait" built-in commands.
>
> Regards, K.
>
> On Tue, Aug 7, 2018 at 9:01 PM, Saurabh <[email protected] <javascript:>
> > wrote:
>
>> Not this way....I can't places tasks in different playbook.. 
>>
>> In other way ?
>>
>>
>>
>>
>> On Tuesday, August 7, 2018 at 12:19:05 PM UTC+5:30, Karl Auer wrote:
>>>
>>> One simple way is to put the tasks in separate playbooks, then:
>>>
>>> ansible-playbook [...opts...] a.yml > a.out 2>&1 &
>>> ansible-playbook [...opts...] b.yml > b.out 2>&1 &
>>> ansible-playbook [...opts...] c.yml > c.out 2>&1 &
>>> ansible-playbook [...opts...] d.yml > d.out 2>&1 &
>>>
>>> Or if you are doing things manually, run them in separate terminals.
>>>
>>> Regards, K.
>>>
>>>
>>> On Tue, Aug 7, 2018 at 4:34 PM, Saurabh <[email protected]> wrote:
>>>
>>>> Hi, 
>>>>
>>>> I would like to execute parallel tasks ? 
>>>>
>>>> Below Example 
>>>>
>>>> - include: a.yml 
>>>>
>>>> - include: b.yml 
>>>>
>>>> a.yml runs and b.yml should also run, 
>>>>
>>>> b.yml shouldn't wait for completion of a.yml. 
>>>>
>>>> is there any way to run parallel tasks ? 
>>>>
>>>> Thank you ! 
>>>>
>>>> -- 
>>>> 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/73c9222d-208a-4e81-ae20-94fa08fdc453%40googlegroups.com
>>>>  
>>>> <https://groups.google.com/d/msgid/ansible-project/73c9222d-208a-4e81-ae20-94fa08fdc453%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>> .
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>>
>>>
>>>
>>> -- 
>>> Karl Auer
>>>
>>> Email  : [email protected]
>>> Website: http://2pisoftware.com
>>>
>>> GPG/PGP : 958A 2647 6C44 D376 3D63 86A5 FFB2 20BC 0257 5816
>>> Previous: F0AB 6C70 A49D 1927 6E05 81E7 AD95 268F 2AB6 40EA
>>>
>> -- 
>> 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:>.
>> To post to this group, send email to [email protected] 
>> <javascript:>.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/ansible-project/5f45dfe5-c24e-48b3-ab38-8603106d8ad8%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/ansible-project/5f45dfe5-c24e-48b3-ab38-8603106d8ad8%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> -- 
> Karl Auer
>
> Email  : [email protected] <javascript:>
> Website: http://2pisoftware.com
>
> GPG/PGP : 958A 2647 6C44 D376 3D63 86A5 FFB2 20BC 0257 5816
> Previous: F0AB 6C70 A49D 1927 6E05 81E7 AD95 268F 2AB6 40EA
>

-- 
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/c01009b2-83bd-4dbe-9ca9-0c93ac4fa08d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to