list images don't work as expected
tuxtof opened this issue · comments
looking the documentation example i try to run
- name: Image Info example
hosts: localhost
vars_files:
- spe-pc.yaml
collections:
- nutanix.nutanix
tasks:
- name: List images
nutanix_image_info:
pc_hostname: "{{ pc_hostname }}"
pc_username: "{{ pc_username }}"
pc_password: "{{ pc_password }}"
validate_certs: False
register: image_list
- debug:
msg: "{{ image_list.image }}"
but it don't works
TASK [debug] **********************************************************************************************************************************************************************************************************************************************************
fatal: [localhost]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: 'dict object' has no attribute 'image'\n\nThe error appears to be in '/Users/cris/Dropbox (Compte Personnel)/dev/ansible-nutanix/image_info.yaml': line 15, column 5, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n register: image_list\n - debug:\n ^ here\n"}
error: 'dict object' has no attribute 'image'
image
key is used for storing spec of a single image and images
for listing all images. Examples are incorrect. Will update them.