Passing job artifacts between playbooks

984 views
Skip to first unread message

Pranav Baitule

unread,
Feb 15, 2018, 11:36:18 AM2/15/18
to AWX Project
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?

Vinod Patil

unread,
Feb 16, 2018, 12:14:28 AM2/16/18
to AWX Project
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 

Pranav Baitule

unread,
Feb 16, 2018, 8:04:09 AM2/16/18
to AWX Project
Nope.

Christopher Meyers

unread,
Feb 16, 2018, 9:30:02 AM2/16/18
to AWX Project
What version of AWX are ya'll using?

Pranav Baitule

unread,
Feb 16, 2018, 9:58:57 AM2/16/18
to AWX Project
AWX version: 1.0.3.41

David D

unread,
Feb 19, 2018, 10:48:46 AM2/19/18
to AWX Project
I have the same issue

AWX Version : 1.0.3.52
Ansible Version 2.4.3.0

Regards,
David

Christopher Meyers

unread,
Feb 20, 2018, 12:28:16 PM2/20/18
to AWX Project
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.

Pranav Baitule

unread,
Feb 20, 2018, 12:29:45 PM2/20/18
to AWX Project
Thanks! I'll update and try again.

David D

unread,
Feb 21, 2018, 4:28:38 AM2/21/18
to AWX Project
Well, I just update, and now everything works fine!
Thanks!!!
Reply all
Reply to author
Forward
0 new messages