I am looking to get the value in attribute average from the output.
- name: Prt volumelogicalsize
debug:
msg: "{{ (volumelogicalsize.stdout| from_json).value }}"
Below is the output
ok: [ansiblehost] => {
"msg": [
{
"displayDescription": "The percentage of the volume consumed including snapshots.",
"errorCode": "Success",
"id": "/subscriptions//resourceGroups//providers/Microsoft.NetApp/netAppAccounts/SAP-ANF-SHARED-PROD1/capacityPools//providers/Microsoft.Insights/metrics/VolumeConsumedSizePercentage",
"name": {
"localizedValue": "Percentage Volume Consumed Size",
"value": "VolumeConsumedSizePercentage"
},
"resourceGroup": "RG-CVS-USE2-SAP-ANF-Shared-Prod-1",
"timeseries": [
{
"data": [
{
"average": 71.25216012022325,
"count": null,
"maximum": null,
"minimum": null,
"timeStamp": "2021-03-17T04:00:00+00:00",
"total": null
}
],
"metadatavalues": []
}
],
"type": "Microsoft.Insights/metrics",
"unit": "Percent"
}
]
}
I am expecting the output like 71.25216012022325 or 71.25.