- From: <
>
- To:
- Subject: [chef] Different data_bags in production and test-kitchen
- Date: Wed, 19 Feb 2014 21:47:10 -0800 (PST)
Hi, I'm using test-kitchen with vagrant, and having trouble with the users
cookbook from opscode.
Suppose we have a bunch of 'users' data bag items and some of them have 'sudo'
in the array of groups. If we have a recipe that has users_manage "sudo",
kitchen converge removes the vagrant user from sudo group because we don't
have
the vagrant user in our data_bags.
I could come up with a few work arounds:
A. Add vagrant user in our data_bags
B. Modify our cookbook so that users_manage "sudo" runs if it's not in Vagrant
Neigher of them is great because:
* We definitely wouldn't like to create vagrant user in production.
* Conditional runs make cookbooks complicated/error-prone.
I thought if .kitchen.yml supported an array of paths in data_bags_path, we
could have mycookbook/data_bags and mycookbook/data_bags_for_vagrant which has
vagrant user with sudo included in the groups. But it doesn't seem to support
arrays at this moment.
Does anyone have the same issue? Any suggestions?
Thanks,
Mitsutoshi Aoe
- [chef] Different data_bags in production and test-kitchen, maoe, 02/19/2014
Archive powered by MHonArc 2.6.16.