# How to run two tasks at the same time

**URL:** <https://forum.ansible.com/t/how-to-run-two-tasks-at-the-same-time/34234>\
**Category:** Ansible Project\
**Created:** [November 24, 2020, 5:17pm UTC](https://forum.ansible.com/t/how-to-run-two-tasks-at-the-same-time/34234 "2020-11-24T17:17:31Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Prathap\_Dasari](https://avatars.discourse-cdn.com/v4/letter/p/db5fbb/32.png) [@Prathap\_Dasari](https://forum.ansible.com/u/Prathap_Dasari)\
**Post date:** [November 24, 2020, 5:17pm UTC](https://forum.ansible.com/t/how-to-run-two-tasks-at-the-same-time/34234/1 "2020-11-24T17:17:31Z")

</div>

Hi ,

How to run two tasks at the same time ? Kindly let me know if anyone knows about it.

Regards,  
Prathap

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/ansible/original/1X/1882d9a01da5d8996a862359b0913cc568a39b84.svg) [@system](https://forum.ansible.com/u/system)\
**Post date:** [December 15, 2020, 4:47pm UTC](https://forum.ansible.com/t/how-to-run-two-tasks-at-the-same-time/34234/2 "2020-12-15T16:47:50Z")

</div>

By default ansible executs tasks in parallel across the targeted hosts  
(limited by --forks). But I'm guessing you want on the same target,  
there is no way to spawn 2 tasks in parallel at the same time, but  
'async' will get you close (it will start executing the 'next task'  
w/o waiting for the current to finish).

[https://docs.ansible.com/ansible/latest/user\_guide/playbooks\_async.html](https://docs.ansible.com/ansible/latest/user_guide/playbooks_async.html)
