I have an Ansible fact like (it might have many hypervisors):
"combined_data": {
"hypervisor-01": [
{
"disk": 150,
"id": "okd-service-01"
},
{
"disk": 25,
"id": "okd-master-02"
},
{
"disk": 25,
"id": "okd-master-01"
}
],
"hypervisor-02": [
{
"disk": 20,
"id": "okd-bootstrap-01"
},
{
"disk": 30,
"id": "okd-worker-01"
},
{
"disk": 25,
"id": "okd-master-03"
}
]
}
And I need to create another fact with the data summarized as:
"result": [
"hypervisor-01": 200,
"hypervisor-02": 75
]
I tried with map and combine but didn't get anything working so far. Any idea?