# Is it possible to specify AWX job id from which AWX will start incrementing for subsequent runs.... please share your thoughts

**URL:** <https://forum.ansible.com/t/is-it-possible-to-specify-awx-job-id-from-which-awx-will-start-incrementing-for-subsequent-runs-please-share-your-thoughts/37297>\
**Category:** AWX Project\
**Tags:** awx\
**Created:** [November 3, 2022, 8:40am UTC](https://forum.ansible.com/t/is-it-possible-to-specify-awx-job-id-from-which-awx-will-start-incrementing-for-subsequent-runs-please-share-your-thoughts/37297 "2022-11-03T08:40:33Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kannan\_Somaiah](https://avatars.discourse-cdn.com/v4/letter/k/eada6e/32.png) [@Kannan\_Somaiah](https://forum.ansible.com/u/Kannan_Somaiah)\
**Post date:** [November 3, 2022, 8:40am UTC](https://forum.ansible.com/t/is-it-possible-to-specify-awx-job-id-from-which-awx-will-start-incrementing-for-subsequent-runs-please-share-your-thoughts/37297/1 "2022-11-03T08:40:33Z")

</div>

Is it possible to specify AWX job id from which AWX will start incrementing for subsequent runs… please share your thoughts

---

<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:** [November 4, 2022, 5:40pm UTC](https://forum.ansible.com/t/is-it-possible-to-specify-awx-job-id-from-which-awx-will-start-incrementing-for-subsequent-runs-please-share-your-thoughts/37297/2 "2022-11-04T17:40:26Z")

</div>

sorry no this is not possible

Is there a particular need for this?

AWX Team

---

<div class="post-metadata">

**Author:** ![mani3887](https://avatars.discourse-cdn.com/v4/letter/m/9f8e36/32.png) [@mani3887](https://forum.ansible.com/u/mani3887)\
**Post date:** [November 4, 2022, 10:02pm UTC](https://forum.ansible.com/t/is-it-possible-to-specify-awx-job-id-from-which-awx-will-start-incrementing-for-subsequent-runs-please-share-your-thoughts/37297/3 "2022-11-04T22:02:02Z")

</div>

For some reason, If you want to know the AWX job id itself, you can assign the job id as an environment variable in your pod spec: something like this:

env:

- name: job\_id  
valueFrom:  
fieldRef:  
fieldPath: metadata.labels[‘ansible-awx-job-id’]

And in your ansible playbook, you can reference this job\_id variable to get the AWX job id that the pod was assigned.

Thanks and Regards,  
Mani

---

<div class="post-metadata">

**Author:** ![howardjones](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/howardjones/32/4169_2.png) [@howardjones](https://forum.ansible.com/u/howardjones)\
**Post date:** [November 4, 2022, 10:29pm UTC](https://forum.ansible.com/t/is-it-possible-to-specify-awx-job-id-from-which-awx-will-start-incrementing-for-subsequent-runs-please-share-your-thoughts/37297/4 "2022-11-04T22:29:15Z")

</div>

You don't even need to do that "{{ tower\_job\_id }}" (and I would guess awx\_job\_id) are already defined.

(you can also use "when: tower\_job\_id is defined" to have tasks that only run when you are running from awx and not locally)

---

<div class="post-metadata">

**Author:** ![Kannan\_Somaiah](https://avatars.discourse-cdn.com/v4/letter/k/eada6e/32.png) [@Kannan\_Somaiah](https://forum.ansible.com/u/Kannan_Somaiah)\
**Post date:** [November 12, 2022, 4:39pm UTC](https://forum.ansible.com/t/is-it-possible-to-specify-awx-job-id-from-which-awx-will-start-incrementing-for-subsequent-runs-please-share-your-thoughts/37297/5 "2022-11-12T16:39:32Z")

</div>

Hi,

Thanks for your reply. Yes we have a requirement where it will be better if we can specify from where the job id should start.
