# AWX variable for AWX host

**URL:** <https://forum.ansible.com/t/awx-variable-for-awx-host/33561>\
**Category:** AWX Project\
**Tags:** awx\
**Created:** [August 6, 2020, 10:56am UTC](https://forum.ansible.com/t/awx-variable-for-awx-host/33561 "2020-08-06T10:56:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![iamroddo](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/iamroddo/32/321_2.png) [@iamroddo](https://forum.ansible.com/u/iamroddo)\
**Post date:** [August 6, 2020, 10:56am UTC](https://forum.ansible.com/t/awx-variable-for-awx-host/33561/1 "2020-08-06T10:56:52Z")

</div>

Hi All,

Is there an AWX variable such as “tower\_job\_id” for the AWX hostname that can be used in playbooks? I want to send a notification to certain users containing a link to AWX job after execution is complete.

Rod

---

<div class="post-metadata">

**Author:** ![Mike\_Charchuk](https://avatars.discourse-cdn.com/v4/letter/m/e47774/32.png) [@Mike\_Charchuk](https://forum.ansible.com/u/Mike_Charchuk)\
**Post date:** [August 6, 2020, 1:09pm UTC](https://forum.ansible.com/t/awx-variable-for-awx-host/33561/2 "2020-08-06T13:09:54Z")

</div>

You can execute hostname delegated to localhost to grab the tower host.

I do this in workflows were I execute a “create\_vars” playbook/job to set numerous variables for use later on in the workflow. The job is executed only on the localhost.

Mike

---

<div class="post-metadata">

**Author:** ![iamroddo](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/iamroddo/32/321_2.png) [@iamroddo](https://forum.ansible.com/u/iamroddo)\
**Post date:** [August 7, 2020, 3:47am UTC](https://forum.ansible.com/t/awx-variable-for-awx-host/33561/3 "2020-08-07T03:47:32Z")

</div>

Hi Mike,

Thanks for the reply, however it’s not the solution. The AWX task container hostname which is determined by K8S. The AWX URL is configured in the system settings. I can see that it’s available via the API at https:///api/v2/settings/all/. I thought that it may be available also a variable.

Rod
