# concurrent tasks?

**URL:** <https://forum.ansible.com/t/concurrent-tasks/33963>\
**Category:** AWX Project\
**Created:** [October 5, 2020, 9:02pm UTC](https://forum.ansible.com/t/concurrent-tasks/33963 "2020-10-05T21:02:51Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dave\_York](https://avatars.discourse-cdn.com/v4/letter/d/77aa72/32.png) [@Dave\_York](https://forum.ansible.com/u/Dave_York)\
**Post date:** [October 5, 2020, 9:02pm UTC](https://forum.ansible.com/t/concurrent-tasks/33963/1 "2020-10-05T21:02:51Z")

</div>

When I run a playbook in tower, it seems like its always runs concurrently 5 tasks at a time. Unfortunately, I have 6 servers in my inventory, so when I get to a task like this:

- name: restart server  
win\_reboot:  
pre\_reboot\_delay: 300  
post\_reboot\_delay: 60  
reboot\_timeout: 3600

It waits 5 minutes (pre\_reboot\_delay) for 5 of the servers and reboots them, then waits for them to come online - and only after that does it start the 5 minute wait for the 6th server… So the whole task takes a minimum of 12 minutes ((pre\_reboot\_delay + post\_reboot\_delay)\*2 server groups)

I’m having trouble figuring out which setting this is… anyone have any idea?

---

<div class="post-metadata">

**Author:** ![Dave\_York](https://avatars.discourse-cdn.com/v4/letter/d/77aa72/32.png) [@Dave\_York](https://forum.ansible.com/u/Dave_York)\
**Post date:** [October 5, 2020, 9:31pm UTC](https://forum.ansible.com/t/concurrent-tasks/33963/2 "2020-10-05T21:31:22Z")

</div>

Correction "it seems like its always runs concurrently 5 tasks at a time. " should be "it seems like its always runs concurrently 5 **nodes** at a time. "

---

<div class="post-metadata">

**Author:** ![Chiku](https://avatars.discourse-cdn.com/v4/letter/c/3ab097/32.png) [@Chiku](https://forum.ansible.com/u/Chiku)\
**Post date:** [October 6, 2020, 10:02am UTC](https://forum.ansible.com/t/concurrent-tasks/33963/3 "2020-10-06T10:02:51Z")

</div>

It's ansible default behavior. You change it for ansible cli command or for awx job template.

[https://docs.ansible.com/ansible-tower/latest/html/userguide/job\_templates.html](https://docs.ansible.com/ansible-tower/latest/html/userguide/job_templates.html)

Forks: The number of parallel or simultaneous processes to use while executing the playbook. A value of zero uses the Ansible default setting, which is 5 parallel processes unless overridden in /etc/ansible/ansible.cfg.

---

<div class="post-metadata">

**Author:** ![klaasdemter](https://avatars.discourse-cdn.com/v4/letter/k/3bc359/32.png) [@klaasdemter](https://forum.ansible.com/u/klaasdemter)\
**Post date:** [October 6, 2020, 3:26pm UTC](https://forum.ansible.com/t/concurrent-tasks/33963/4 "2020-10-06T15:26:37Z")

</div>

For long running tasks (in my use-cases this is usually the installation/update of packages) I like to use async to get them running on all targets while not needing hundreds of forks. I am not sure if this works with win\_reboot though 🙂

Greetings

Klaas
