-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug] custom_filter ineffective in module nutanix.ncp.ntnx_foundation_central_imaged_nodes_info #374
Comments
@abhimutant Please check this, thanks. |
Moving it to 1.9.2 due to unavailability of fix. |
I'm seeing a similar issue with ntnx_clusters_info and ntnx_hosts_info with both filter and custom_filter. Is this related? Setting a filter ntnx_vms_info, however, filters correctly with For example, this returns all clusters ---
[...]
tasks:
- name: Get cluster info
nutanix.ncp.ntnx_clusters_info:
nutanix_host: "{{ prism_host }}"
nutanix_username: "{{ prism_username }}"
nutanix_password: "{{ prism_password }}"
filter:
name: "{{ cluster_name }}"
register: cluster_info The work around I have is - name: Get cluster info
nutanix.ncp.ntnx_clusters_info:
nutanix_host: "{{ prism_host }}"
nutanix_username: "{{ prism_username }}"
nutanix_password: "{{ prism_password }}"
filter:
name: "{{ cluster_name }}" # DOES NOT WORK
register: all_clusters
- name: Get cluster
set_fact:
cluster: "{{ (all_clusters.response.entities | selectattr('status.name', '==', cluster_name ) | first) }}"
- name: Get hosts
nutanix.ncp.ntnx_hosts_info:
nutanix_host: "{{ prism_host }}"
nutanix_username: "{{ prism_username }}"
nutanix_password: "{{ prism_password }}"
filter:
cluster_name: "{{ cluster_name }}" # DOES NOT WORK
register: all_hosts
- name: Get hosts info
set_fact:
hosts: "{{ all_hosts.response.entities | selectattr('status.cluster_reference.uuid', '==', cluster.metadata.uuid ) }}" |
@nx-sbourdeaud What is the collection version you used ? We checked and it works as expected. Can you check if all nodes are not under same block ? |
Describe the bug
Using custom_filter has not effect on the result/output (all imaged nodes are displayed)
To Reproduce
Steps to reproduce the behavior:
ansible-playbook imaged_nodes_info.yml
Expected behavior
Only nodes whose properties match the custom filter should be returned.
The text was updated successfully, but these errors were encountered: