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

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

sorry no this is not possible

Is there a particular need for this?

AWX Team

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

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)

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.