I tried it 4 ways:
msg: "{{ item.description }}"
msg: "{{ item['description'] }}"
msg: "{{ item[0].description }}"
msg: "{{ item[0]['description'] }}"
and all 4 give me the following error:
TASK [Show results]
***********************************************************************************************************************************************************************************
fatal: [localhost]: FAILED! => {"msg": "The task includes an option with an
undefined variable. The error was: 'list object' has no attribute
'description'. 'list object' has no attribute 'description'\n\nThe error
appears to be in '/root/vm_snapshot_info.yml': line 48, column 7, but
may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe
offending line appears to be:\n\n\n - name: Show results\n ^
here\n"}
Thanks,
Harry
On Friday, February 24, 2023 at 7:17:56 AM UTC-5 Todd Lewis wrote:
> That was close, but you used a comma instead of a period in "{{
> item.description }}".
>
>
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/6dabf16a-9230-4ddb-90de-603d5f7237aan%40googlegroups.com.