I have the following set_fact task:
- set_fact:
task_uuid: "{{ task_status.json |lower |to_json | from_json |json_query('taskuuid') }}"
This is what I have for the task_status.json:
debug:
var: task_status.json
{
"task_status.json": {
"taskUuid": "e66cea71-ef33-4610-9194-0403e4bb2153"
}
}
Output:
task_uuid var is empty.
I tried any and all combination (removed the to_json,from_json,etc).
Please advice. I am basically looking to pull the value of taskUUID.
I am re-using the set_fact task for a few api endpoints - some of which give 'taskUuid' and some give 'taskuuid' and some even 'task_uuid' - i m finding a way to get the UUID from these endpoints using a common filter