I have a chef_vault with a search_query of role:myrole
.
I want the chef server to periodically refresh the search query for the vault adding new nodes and removing any nodes that no longer have the role applied to them.
To test this a applied the role to a node and ran:
knife vault update mevault item1 -S "role:myrole" --mode client
The node appeared in the vaults clients list. I then removed the role from the node and ran the command again, but the node still appears in the vaults clients list. I also tried this command with the --clean switch, but that did not remove the node from the clients list it seems to not work for the refresh command.
The vault update command with the clean switch works, but I have to hard code the search query into it, I just want to refresh the search query already applied to the vault item.