# Running templates in parallel using a workflow template

**URL:** <https://forum.ansible.com/t/running-templates-in-parallel-using-a-workflow-template/27575>\
**Category:** AWX Project\
**Created:** [May 21, 2018, 11:10am UTC](https://forum.ansible.com/t/running-templates-in-parallel-using-a-workflow-template/27575 "2018-05-21T11:10:52Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![nrk](https://avatars.discourse-cdn.com/v4/letter/n/9de0a6/32.png) [@nrk](https://forum.ansible.com/u/nrk)\
**Post date:** [May 21, 2018, 11:10am UTC](https://forum.ansible.com/t/running-templates-in-parallel-using-a-workflow-template/27575/1 "2018-05-21T11:10:52Z")

</div>

Hi there !

I am trying to run several templates simultaneously using a Workflow Template but at this moment, is not working.

So, my question is. Is it possible to run several templates simultaneously from a Workflow?

Here you can see how I configured my workflow.

[https://lh3.googleusercontent.com/-E597SSEoMiA/WwKopKogykI/AAAAAAAADj0/EAZi6iCzbr0YX0NZLqFfaTF0ds3geqwVwCLcBGAs/s1600/Screen%2BShot%2B2018-05-21%2Bat%2B13.06.25.png](https://lh3.googleusercontent.com/-E597SSEoMiA/WwKopKogykI/AAAAAAAADj0/EAZi6iCzbr0YX0NZLqFfaTF0ds3geqwVwCLcBGAs/s1600/Screen%2BShot%2B2018-05-21%2Bat%2B13.06.25.png)

Thanks in advance.

Cheers,  
Jose

---

<div class="post-metadata">

**Author:** ![Jared\_Tabor](https://avatars.discourse-cdn.com/v4/letter/j/b2d939/32.png) [@Jared\_Tabor](https://forum.ansible.com/u/Jared_Tabor)\
**Post date:** [May 21, 2018, 4:19pm UTC](https://forum.ansible.com/t/running-templates-in-parallel-using-a-workflow-template/27575/2 "2018-05-21T16:19:50Z")

</div>

Hi Jose,

We [recently](https://github.com/ansible/awx/commit/93dc27f0e7ced59f7f3d5a03180ecfae5c99fffa) added support for running concurrent jobs, and you can enable this feature in the UI by navigating to the workflow form and checking the “Enable Concurrent Jobs” checkbox and click Save.

[![](https://lh3.googleusercontent.com/-EFELEeoLO0k/WwLxUE8mvEI/AAAAAAAAAQY/9n5K0QgTCVEatT7GqBq_XjzcD_nR1aaQACLcBGAs/s320/Screen%2BShot%2B2018-05-21%2Bat%2B9.17.51%2BAM.png)](https://lh3.googleusercontent.com/-EFELEeoLO0k/WwLxUE8mvEI/AAAAAAAAAQY/9n5K0QgTCVEatT7GqBq_XjzcD_nR1aaQACLcBGAs/s1600/Screen%2BShot%2B2018-05-21%2Bat%2B9.17.51%2BAM.png)

Hope this helps!

---

<div class="post-metadata">

**Author:** ![Christopher\_Meyers](https://avatars.discourse-cdn.com/v4/letter/c/3e96dc/32.png) [@Christopher\_Meyers](https://forum.ansible.com/u/Christopher_Meyers)\
**Post date:** [May 21, 2018, 4:58pm UTC](https://forum.ansible.com/t/running-templates-in-parallel-using-a-workflow-template/27575/3 "2018-05-21T16:58:22Z")

</div>

nrk,

All Job Templates used in a Workflow Job Templates must have the check box “Enable Concurrent Jobs” checked.

For example, if you have a Workflow Job Template with 3 of the same Job Templates and “Enable Concurrent Jobs” is NOT checked, they will, effectively, be executed serial (one at a time). If you, however, check the “Enable Concurrent Jobs” for the single Job Template, then they will be capable of running in parallel. Note that the jobs MAY not run at the same time due to system capacity constraints.

---

<div class="post-metadata">

**Author:** ![nrk](https://avatars.discourse-cdn.com/v4/letter/n/9de0a6/32.png) [@nrk](https://forum.ansible.com/u/nrk)\
**Post date:** [May 22, 2018, 8:04am UTC](https://forum.ansible.com/t/running-templates-in-parallel-using-a-workflow-template/27575/4 "2018-05-22T08:04:13Z")

</div>

Hello Christopher,

Thanks for you response. Just to clarify, my Workflow Template is running different Job Templates. So, from my understanding, the concurrent jobs is not necessary because I am not running the same job. However, I tried to check the “Enable Concurrent Jobs” in my workflow template and after save, the option is unchecked again automatically.

I am running only 2 job templates over 4 hosts, I think that there is no issues with my server specs. 8GB RAM, 4 CPUs.

I saw, if I leave the “forks” to default in my job templates, the jobs are executed one by one in the workflow template. If I set the forks to 1 in all my job templates and I execute the workflow template, it seems to be parallelized.

Cheers,  
nrk

---

<div class="post-metadata">

**Author:** ![stan.varlamov](https://avatars.discourse-cdn.com/v4/letter/s/54ee81/32.png) [@stan.varlamov](https://forum.ansible.com/u/stan.varlamov)\
**Post date:** [July 31, 2018, 11:16am UTC](https://forum.ansible.com/t/running-templates-in-parallel-using-a-workflow-template/27575/5 "2018-07-31T11:16:06Z")

</div>

nrk,

I see the same behavior in my setup: the checkbox is cleared after Save. Were you able to confirm that the check at the Workflow level is “optional”?

---

<div class="post-metadata">

**Author:** ![Christopher\_Meyers](https://avatars.discourse-cdn.com/v4/letter/c/3e96dc/32.png) [@Christopher\_Meyers](https://forum.ansible.com/u/Christopher_Meyers)\
**Post date:** [August 1, 2018, 2:47pm UTC](https://forum.ansible.com/t/running-templates-in-parallel-using-a-workflow-template/27575/6 "2018-08-01T14:47:07Z")

</div>

Hmm, this might be a UI bug. You can observe the actual state of the field in the API. You can also change the state of what we call “allow\_simultaneous” on the workflow job template via the API. I’ve attached a gif of how this can be done. Let me know if this works for you!

> **(attachments)**
>
> ![awx_workflow_allow_simultaneous.gif](https://us1.discourse-cdn.com/ansible/original/2X/7/797639889faf960fbe41e248f7c6bb4fffd25ef5.gif)

---

<div class="post-metadata">

**Author:** ![Christopher\_Meyers](https://avatars.discourse-cdn.com/v4/letter/c/3e96dc/32.png) [@Christopher\_Meyers](https://forum.ansible.com/u/Christopher_Meyers)\
**Post date:** [August 1, 2018, 2:55pm UTC](https://forum.ansible.com/t/running-templates-in-parallel-using-a-workflow-template/27575/7 "2018-08-01T14:55:35Z")

</div>

Try 2 at attaching/injecting an animated gif. Also linking to external gif in case it’s a file size limit thing [https://i.makeagif.com/media/8-01-2018/UQXr94.gif](https://i.makeagif.com/media/8-01-2018/UQXr94.gif)

> **(attachments)**
>
> ![awx_workflow_allow_simultaneous.gif](https://us1.discourse-cdn.com/ansible/original/2X/7/797639889faf960fbe41e248f7c6bb4fffd25ef5.gif)

---

<div class="post-metadata">

**Author:** ![stan.varlamov](https://avatars.discourse-cdn.com/v4/letter/s/54ee81/32.png) [@stan.varlamov](https://forum.ansible.com/u/stan.varlamov)\
**Post date:** [August 1, 2018, 11:29pm UTC](https://forum.ansible.com/t/running-templates-in-parallel-using-a-workflow-template/27575/8 "2018-08-01T23:29:38Z")

</div>

Yes, I noticed the flag was set on a Job API response for the Template, so I figured the feature was working. Thank you for confirming, Christopher.
