On AWX getting JOB Failure : Task was marked as running but was not present in the job queue, so it has been marked as failed. issue

Hi Team,

On AWX 21.5.0 I am running one job for 24x7. out of almost 600 job runs 10 jobs are getting this error: “Task was marked as running but was not present in the job queue, so it has been marked as failed.”

though the job gets completed. playbook runs completely. but in job status it show failed.

please suggest.
Jagruti

I have this when clause that contains a variable named agent_host and I can’t determine how to rewrite it to remove the mustaches. The logic works, however I get the warning.

when: “‘Linked to: {{ agent_host }}’ not in nessus_link_status.stdout”

[WARNING]: conditional statements should not include jinja2 templating delimiters such as {{ }} or {% %}. Found: ‘Linked to: {{ agent_host }}’ not in nessus_link_status.stdout

Thanks,

Stan

when: “‘Linked to: agent_host’ not in nessus_link_status.stdout”

The above works for me.

Not sure how that would work. This should work

when: “'Linked to: ’ ~ agent_host not in nessus_link_status.stdout”

Another way to do this is to define a local var

vars:
__str: “Linked to: {{ agent_host }}” # not sure if the quotes are strictly necessary - I default to using quotes when the string contains “:”
when: __str not in nessus_link_status.stdout

this issue has been reported here https://github.com/ansible/awx/issues/9594 but no solution as of yet

AWX Team