Create and add to a multi field array

I am trying to find away that i can create an array that i can reference later that would be built through a series of include_task plays. Through the plays i will specific pieces of data that i care to keep for use later.

My layout is as:

main.yml
– inlcude_tasks.yml with loop
– include_task statements (3)

So i have a main playbook, that has a include_tasks play that is calling another task list that is then calling three more include_tasks. I am doing it this way to as i loop through each item at the main.yml play i am able to work with a single dataset through each uri call to keep passing key data.

When i am done with the last include_task i would like to add 6 vars that i care about to a single array so i can reference them later.

Something like : group, type, asset, location, etc.

This would be something i would loop through to do more stuff later.

Thoughts??

Hi

The question is a bit abstract - can you provide some more tangible
code/playbooks/data?

I dont have much data at the moment since I am using a few test playbooks with static set vars to see if nested include task statements would work. Which it did. The part I am missing is after the nested includes that run in a loop, I want to print a summary of specifc vars to the screen for confirmation to the user running the playbook.