# Is there a play variable which contains the name (and tag) of the AWX execution environment being used?

**URL:** <https://forum.ansible.com/t/is-there-a-play-variable-which-contains-the-name-and-tag-of-the-awx-execution-environment-being-used/4756>\
**Category:** Get Help\
**Tags:** awx, ee\
**Created:** [April 5, 2024, 6:03pm UTC](https://forum.ansible.com/t/is-there-a-play-variable-which-contains-the-name-and-tag-of-the-awx-execution-environment-being-used/4756 "2024-04-05T18:03:33Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jpmens](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/jpmens/32/5543_2.png) [@jpmens](https://forum.ansible.com/u/jpmens)\
**Post date:** [April 5, 2024, 6:03pm UTC](https://forum.ansible.com/t/is-there-a-play-variable-which-contains-the-name-and-tag-of-the-awx-execution-environment-being-used/4756/1 "2024-04-05T18:03:33Z")

</div>

I’d like to be able to report in a play with which execution environment a job template (i.e. playbook) is being run, mainly for debugging purposes.

Is there a magic `awx_*` (or `tower_*`) variable which surfaces this information?

---

<div class="post-metadata">

**Author:** ![fosterseth](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/fosterseth/32/101_2.png) [@fosterseth](https://forum.ansible.com/u/fosterseth)\
**Post date:** [April 5, 2024, 7:36pm UTC](https://forum.ansible.com/t/is-there-a-play-variable-which-contains-the-name-and-tag-of-the-awx-execution-environment-being-used/4756/2 "2024-04-05T19:36:41Z")

</div>

it does not appear that we do

> <https://github.com/ansible/awx/blob/d06ce8f9119267862fcca00fc85af3a9f323d61c/awx/main/models/unified_jobs.py#L1529>

you can open an enhancement issue on github, but it’s unlikely to get prioritize by awx developers. This would be a great contribution if you are interested in opening a PR!

Seth

---

<div class="post-metadata">

**Author:** ![jpmens](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/jpmens/32/5543_2.png) [@jpmens](https://forum.ansible.com/u/jpmens)\
**Post date:** [April 5, 2024, 10:10pm UTC](https://forum.ansible.com/t/is-there-a-play-variable-which-contains-the-name-and-tag-of-the-awx-execution-environment-being-used/4756/3 "2024-04-05T22:10:16Z")

</div>

Thank you, @fosterseth, that’s a great help. Using `awx_job_id` (e.g. 294) I can find what I need using the _jobs_ API:

```console
awx jobs get 294 | jq .summary_fields.execution_environment.name
"whEEl"

```

which is exactly what I need. (I’m desperately trying to figure out why plugins burned into my EE aren’t being found whereas using the same EE in `ansible-navigator` works, and it worked in AWX on Tuesday … sighs.)

I’m not sure I have the stamina to provide a PR to add the field to `awx_meta_vars()` though.

---

<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:** [May 5, 2024, 10:10pm UTC](https://forum.ansible.com/t/is-there-a-play-variable-which-contains-the-name-and-tag-of-the-awx-execution-environment-being-used/4756/4 "2024-05-05T22:10:27Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
