# Passing job artifacts between playbooks

**URL:** <https://forum.ansible.com/t/passing-job-artifacts-between-playbooks/26748>\
**Category:** AWX Project\
**Tags:** awx\
**Created:** [February 15, 2018, 4:36pm UTC](https://forum.ansible.com/t/passing-job-artifacts-between-playbooks/26748 "2018-02-15T16:36:18Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pranav\_Baitule](https://avatars.discourse-cdn.com/v4/letter/p/3da27b/32.png) [@Pranav\_Baitule](https://forum.ansible.com/u/Pranav_Baitule)\
**Post date:** [February 15, 2018, 4:36pm UTC](https://forum.ansible.com/t/passing-job-artifacts-between-playbooks/26748/1 "2018-02-15T16:36:18Z")

</div>

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.](http://docs.ansible.com/ansible-tower/latest/html/userguide/workflows.html#extra-variables)

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](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?

---

<div class="post-metadata">

**Author:** ![Vinod\_Patil](https://avatars.discourse-cdn.com/v4/letter/v/ce73a5/32.png) [@Vinod\_Patil](https://forum.ansible.com/u/Vinod_Patil)\
**Post date:** [February 16, 2018, 5:14am UTC](https://forum.ansible.com/t/passing-job-artifacts-between-playbooks/26748/2 "2018-02-16T05:14:27Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Pranav\_Baitule](https://avatars.discourse-cdn.com/v4/letter/p/3da27b/32.png) [@Pranav\_Baitule](https://forum.ansible.com/u/Pranav_Baitule)\
**Post date:** [February 16, 2018, 1:04pm UTC](https://forum.ansible.com/t/passing-job-artifacts-between-playbooks/26748/3 "2018-02-16T13:04:09Z")

</div>

Nope.

---

<div class="post-metadata">

**Author:** ![Christopher\_Meyers](https://avatars.discourse-cdn.com/v4/letter/c/3e96dc/32.png) [@Christopher\_Meyers](https://forum.ansible.com/u/Christopher_Meyers)\
**Post date:** [February 16, 2018, 2:30pm UTC](https://forum.ansible.com/t/passing-job-artifacts-between-playbooks/26748/4 "2018-02-16T14:30:02Z")

</div>

What version of AWX are ya’ll using?

---

<div class="post-metadata">

**Author:** ![Pranav\_Baitule](https://avatars.discourse-cdn.com/v4/letter/p/3da27b/32.png) [@Pranav\_Baitule](https://forum.ansible.com/u/Pranav_Baitule)\
**Post date:** [February 16, 2018, 2:58pm UTC](https://forum.ansible.com/t/passing-job-artifacts-between-playbooks/26748/5 "2018-02-16T14:58:56Z")

</div>

AWX version: 1.0.3.41

---

<div class="post-metadata">

**Author:** ![David\_D](https://avatars.discourse-cdn.com/v4/letter/d/f14d63/32.png) [@David\_D](https://forum.ansible.com/u/David_D)\
**Post date:** [February 19, 2018, 3:48pm UTC](https://forum.ansible.com/t/passing-job-artifacts-between-playbooks/26748/6 "2018-02-19T15:48:46Z")

</div>

I have the same issue

AWX Version : 1.0.3.52  
Ansible Version 2.4.3.0

Regards,  
David

---

<div class="post-metadata">

**Author:** ![Christopher\_Meyers](https://avatars.discourse-cdn.com/v4/letter/c/3e96dc/32.png) [@Christopher\_Meyers](https://forum.ansible.com/u/Christopher_Meyers)\
**Post date:** [February 20, 2018, 5:28pm UTC](https://forum.ansible.com/t/passing-job-artifacts-between-playbooks/26748/7 "2018-02-20T17:28:16Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Pranav\_Baitule](https://avatars.discourse-cdn.com/v4/letter/p/3da27b/32.png) [@Pranav\_Baitule](https://forum.ansible.com/u/Pranav_Baitule)\
**Post date:** [February 20, 2018, 5:29pm UTC](https://forum.ansible.com/t/passing-job-artifacts-between-playbooks/26748/8 "2018-02-20T17:29:45Z")

</div>

Thanks! I’ll update and try again.

---

<div class="post-metadata">

**Author:** ![David\_D](https://avatars.discourse-cdn.com/v4/letter/d/f14d63/32.png) [@David\_D](https://forum.ansible.com/u/David_D)\
**Post date:** [February 21, 2018, 9:28am UTC](https://forum.ansible.com/t/passing-job-artifacts-between-playbooks/26748/9 "2018-02-21T09:28:38Z")

</div>

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