Passing job artifacts between playbooks

I am not able to recreate passing a result of one playbook to another in a workflow using the set_stats module in the example shown here.

The second playbook use_set_stats.yml always throws an error saying the variable is undefined. The use_set_stats.yml playbook is run after the invoke_set_stats.yml runs successfully in the workflow.

This is the debug of invoke_set_stats.yml -

`

{
“changed”: false,
“ansible_stats”: {
“aggregate”: true,
“data”: {
“integration_results_url”: “https://file.io/XjUc23
},
“per_host”: false
},
“_ansible_no_log”: false

`

This is the debug of use_set_stats.yml -

`

{
“msg”: “The task includes an option with an undefined variable. The error was: ‘integration_results_url’ is undefined\n\nThe error appears to have been in ‘/var/lib/awx/projects/_25__set_stats/use_set.yml’: line 4, column 7, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n tasks:\n - name: "Get test results from the web"\n ^ here\n\nexception type: <class ‘ansible.errors.AnsibleUndefinedVariable’>\nexception: ‘integration_results_url’ is undefined”
}

`

What am I missing here?

Hi Pranav,

Has it worked. I am facing the same issue ? The documented example as well as my modified worflow template playbooks are not working for this set_stats module.

Regards,
Vinod

Nope.

What version of AWX are ya’ll using?

AWX version: 1.0.3.41

I have the same issue

AWX Version : 1.0.3.52
Ansible Version 2.4.3.0

Regards,
David

There was a race condition between when the next job in a workflow runs and the results of the previous job, with the saved set_stats. This is now fixed in the most current release (1.0.4) of awx.

Thanks! I’ll update and try again.

Well, I just update, and now everything works fine!
Thanks!!!