A basic data bag structure is: /data_bags/[data bag name]/[data bag items]
Let say I want to create a data bag for all the possible admins of all my nodes in a data bag called users. i.e.
/data_bags/users/admin1.json
/data_bags/users/admin2.json
/data_bags/users/admin3.json
Now for node1
I only want to have admin1 and admin3
and for node2
I want to have admin2
and admin3
as my admins.
How can I separate or structure my configuration in a way that I can specify or split my data bags item for each different node?
One idea I have is if we can do something like this.
/data_bags/node1/users/...
/data_bags/node2/users/...
I am a starter in chef, so if what I want to is stupid and should be handled other way then, I appreciate any information to point me to right direction.