Create dictionaries from the lists
- set_fact:
agg: "{{ agg|default({})|combine({item.node_name: item}) }}"
loop: "{{ aggregate_info }}"
- set_fact:
net: "{{ net|default({})|combine({item.node_name: item}) }}"
loop: "{{ net_interface }}"
Then combine the corresponding dictionaries and concatenate the results into
a new list
- set_fact:
aggregate_info2: "{{ aggregate_info2|default() +
[agg[item]|combine(net[item])] }}"
loop: "{{ agg.keys()|list }}"
HTH,
-vlado