For the better user access management, we created cookbook for user access and kept the list of users in databag. For each environment there is databag. Now the issue is, if I add\update users in databag the cookbook is not getting executing. PS: The cookbook is looping through the databag.
I have tested with the version as well. we have environment in chef for environment related variable.
I want to run cookbook everytime databag changes or even if that particular cookbook runs everytime, we are ok.
Thanks Praveen
This is not how Chef works. You either run it on a regular schedule (every X minutes) or on-demand via something like SSH or WinRM. You could build your own control plane to detect data bag changes, but it's not something Chef provides.