lhs: ALL
operator: IN
rhs:
collection: ALL
register: update_acp
debug:
var: update_acp
`
Stack trace
N/A
Expected behavior
update an existing ACP's filters list
Additional context
Comparison is only going one way - checking if items in the existing filter list are in the updated filter list. To add a new entry to the filters object, the comparison needs to go the other way - check if the items in the updated filter list are in the existing filter list.
Describe the bug As exists, items can only be removed from a filters list (context_list item in API) , but no new items can be added.
To Reproduce Steps to reproduce the behavior:
sample playbook: `- hosts: localhost gather_facts: false vars: role: uuid: "00000000-0000-0000-0000-123456789012" name: test role project: uuid: "12345678-1234-2345-3456-789012345678"
tasks:
name: create basic ACP nutanix.ncp.ntnx_acps: validate_certs: False state: present nutanix_host: "{{ IP }}" nutanix_username: "{{ username }}" nutanix_password: "{{ password }}" wait: true name: MinACP role: uuid: '{{ role.uuid }}' register: basic_acp
name: Update new basic ACP with a scope-entity filter object nutanix.ncp.ntnx_acps: validate_certs: False state: present nutanix_host: "{{ IP }}" nutanix_username: "{{ username }}" nutanix_password: "{{ password }}" wait: true name: "MinACP-modified" role: uuid: '{{ role.uuid }}' acp_uuid: "{{ basic_acp.response.metadata.uuid }}" filters:
debug: var: update_acp
`
Stack trace N/A
Expected behavior update an existing ACP's filters list
Additional context Comparison is only going one way - checking if items in the existing filter list are in the updated filter list. To add a new entry to the filters object, the comparison needs to go the other way - check if the items in the updated filter list are in the existing filter list.