# AWX Workflow Convergence Artifacts

**URL:** <https://forum.ansible.com/t/awx-workflow-convergence-artifacts/8701>\
**Category:** Get Help\
**Tags:** awx\
**Created:** [September 23, 2024, 8:23am UTC](https://forum.ansible.com/t/awx-workflow-convergence-artifacts/8701 "2024-09-23T08:23:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jahknem](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/jahknem/32/346_2.png) [@jahknem](https://forum.ansible.com/u/jahknem)\
**Post date:** [September 23, 2024, 8:23am UTC](https://forum.ansible.com/t/awx-workflow-convergence-artifacts/8701/1 "2024-09-23T08:23:45Z")

</div>

I have the following problem: In my current workflow I have 2 long running playbooks, which run in parallel. If they both succeed, a follow up playbook starts, which requires data from both previous playbooks

Here an example:

 ![image](https://us1.discourse-cdn.com/ansible/original/2X/5/570735e7061400a798d779c858c46a26ee3887fd.png)

To reduce code complexity they both write to a “customer” object, albeit to different children:

First playbook

```auto
customer:
  1234:
    color: yellow

```

Second playbook

```auto
customer:
  1234:
    foo: bar

```

In my mind, AWX would combine these into a struct such as this:

```auto
customer:
  1234:
    foo: bar
    color: yellow

```

But instead it only gets the data from the playbook that finishes first. How can I change that, or is there anything at all I can do about that?

I was thinking about packing it all into a workflow tempalte and using that workflow tempalte itself in another workflow template. But would that even work?

---

<div class="post-metadata">

**Author:** ![jiholland](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/jiholland/32/11273_2.png) [@jiholland](https://forum.ansible.com/u/jiholland)\
**Post date:** [September 25, 2024, 7:20am UTC](https://forum.ansible.com/t/awx-workflow-convergence-artifacts/8701/2 "2024-09-25T07:20:25Z")

</div>

Hi.  
This is expected behavior in Ansible, as variables will override each other according to this [variable precedence](https://docs.ansible.com/ansible/latest/playbook_guide/playbooks_variables.html#variable-precedence-where-should-i-put-a-variable).

One solution is to separate the customer variables in first and second playbook, and then combine the result in the third playbook.

```yaml
---
- name: Play1.
  hosts: localhost
  tasks:
    - name: Set customer fact.
      ansible.builtin.set_fact:
        customer_1:
          1234:
            foo: bar

- name: Play2.
  hosts: localhost
  tasks:
    - name: Set customer fact.
      ansible.builtin.set_fact:
        customer_2:
          1234:
            color: yellow

- name: Play3.
  hosts: localhost
  tasks:
    - name: Combine facts.
      ansible.builtin.set_fact:
        customer: "{{ customer_1 | ansible.builtin.combine(customer_2, recursive=true) }}"

    - name: Print combined customer fact.
      ansible.builtin.debug:
        var: customer

```

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/ansible/original/1X/1882d9a01da5d8996a862359b0913cc568a39b84.svg) [@system](https://forum.ansible.com/u/system)\
**Post date:** [October 25, 2024, 7:20am UTC](https://forum.ansible.com/t/awx-workflow-convergence-artifacts/8701/3 "2024-10-25T07:20:28Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
