Open jhowe-uw opened 1 year ago
Dear @jhowe-uw, Unfortunately, there is a typo in the example, and as you can see, the error message says that the filter must be a dictionary. So it should look like this.
nutanix.ncp.ntnx_images_info:
nutanix_host: '{{ nutanix_hostname }}'
filter:
name: '{{ inventory_hostname_short }}-cloud-init.iso'
@Gevorg-Khachatryan-97
I tested with the new syntax and it works for me.
Thanks!
Describe the bug
Following the examples provided for ntnx_images_info, I encounter runtime issues when applying a filter to the images_info query
We use cloud-init isos to customize the VM on deploys
We have a playbook that leaves ${hostname}-cloud-init isos on VM deploy failure.
It appears we can upload multiple instances of the same ISO with the same name. This causes issues on new VM deploys using nutanix.ncp.ntnx_vms ( 500 Internal Server Error )
To address this issue, I am attempting to sanity check for existing cloud-init isos and make a list to purge if duplicates are found.
To Reproduce Steps to reproduce the behavior:
Create 12 images named "some-host-cloud-init.iso" using the same ISO file.
Relevant vars
Playbook
Stack trace
Expected behavior
Filtering on '{{ inventory_hostname_short }}-cloud-init.iso' should result in a json list containing the 12 instances of this file that I can parse to gather a list of UUIDs to queue for deletion.
Additional context
I tested using a known single instance of an image name and got the same error ( 'CENTOS_78' )
Please let me know if you need additional information.
Thanks