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.
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
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