Hello Team,
I am trying to iteration register value and print that value using debug but I unable to achieve the result which I want to get it. Below is the register value in that I like to get value of “lifecycle_state” using debug. Could you please someone help me on this.
Playbook part:
- debug: var=“{{ item }}”
with_items: result_1.volume_attachments
Register result:
ok: [localhost] => (item=result_1.volume_attachments) => {
“ansible_loop_var”: “item”,
“item”: “result_1.volume_attachments”,
“result_1.volume_attachments”: [
{
“attachment_type”: “iscsi”,
“availability_domain”: “xxxxxxxxx”,
“chap_secret”: null,
“chap_username”: null,
“compartment_id”: “xxxxxxxxxxx”,
“device”: null,
“display_name”: “xxxxxxxxx”,
“id”: “xxxxxxxxxxx”,
“instance_id”: “xxxxxx”,
“ipv4”: “xxxxx”,
“iqn”: “xxxxxxxxxxxx”,
“is_pv_encryption_in_transit_enabled”: false,
“is_read_only”: false,
“lifecycle_state”: “ATTACHED”,
“port”: 3260,
“time_created”: “xxxxxxxx”,
“volume_id”: “xxxxxxxxxxx”
}
]
}