# URGENT Help - Can you setup execution environments dynamically for job templates?

**URL:** <https://forum.ansible.com/t/urgent-help-can-you-setup-execution-environments-dynamically-for-job-templates/38113>\
**Category:** AWX Project\
**Tags:** awx, ee\
**Created:** [June 16, 2023, 11:27am UTC](https://forum.ansible.com/t/urgent-help-can-you-setup-execution-environments-dynamically-for-job-templates/38113 "2023-06-16T11:27:31Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vrunda](https://avatars.discourse-cdn.com/v4/letter/v/54ee81/32.png) [@Vrunda](https://forum.ansible.com/u/Vrunda)\
**Post date:** [June 16, 2023, 11:27am UTC](https://forum.ansible.com/t/urgent-help-can-you-setup-execution-environments-dynamically-for-job-templates/38113/1 "2023-06-16T11:27:31Z")

</div>

Hello,

Scenario - 2 containers(say X & Y) of AWX configured in Load balancer setup. Both the AWX UIs pointing to one single DB. Currently in both the AWX UIs, Job templates are configured with execution environment specified as “X”.

Problem - What is the right way (without manual reconfiguration) to configure execution environments if you want to do a switchover to Y when X is down.

Thanks,

---

<div class="post-metadata">

**Author:** ![AWX\_Project](https://avatars.discourse-cdn.com/v4/letter/a/eada6e/32.png) [@AWX\_Project](https://forum.ansible.com/u/AWX_Project)\
**Post date:** [June 21, 2023, 6:50pm UTC](https://forum.ansible.com/t/urgent-help-can-you-setup-execution-environments-dynamically-for-job-templates/38113/2 "2023-06-21T18:50:35Z")

</div>

Can you elaborate on your use case a little more, specifically why do you need a different EE depending on which AWX pods are running at that time.

execution environment are designed to be agnostic to the AWX deployment in general, so we aren’t seeing why EEs would need to change if your cluster pods change.

Thanks for any additional info you can provide

AWX Team

---

<div class="post-metadata">

**Author:** ![Vrunda](https://avatars.discourse-cdn.com/v4/letter/v/54ee81/32.png) [@Vrunda](https://forum.ansible.com/u/Vrunda)\
**Post date:** [June 27, 2023, 3:03pm UTC](https://forum.ansible.com/t/urgent-help-can-you-setup-execution-environments-dynamically-for-job-templates/38113/3 "2023-06-27T15:03:09Z")

</div>

Hello,

Correcting the problem statement - Its about how to ensure high availability of Instance\_groups.  
If we have multiple instance groups in a setup then how to configure it in such a way that the job runs on the highly available instance\_group only.

I see that AWX allows you to assign multiple instance\_groups at templates level/ inventory level/ organization level. But still it picks up the first one in a sequence for execution. If the first instance\_group is not available then it doesn’t continue with 2nd one. The job simply fails. How to avoid this situation and manual configuring/reconfiguring of instance\_groups ?

Thanks,  
Vrunda

---

<div class="post-metadata">

**Author:** ![AWX\_Project](https://avatars.discourse-cdn.com/v4/letter/a/eada6e/32.png) [@AWX\_Project](https://forum.ansible.com/u/AWX_Project)\
**Post date:** [June 28, 2023, 7:04pm UTC](https://forum.ansible.com/t/urgent-help-can-you-setup-execution-environments-dynamically-for-job-templates/38113/4 "2023-06-28T19:04:02Z")

</div>

can you provide more details on your different instances? are you using remote execution nodes, or are you using container groups to connect to remote k8s clusters?

AWX Team
