- From: Mitsutoshi Aoe <
>
- To: Noah Kantrowitz <
>
- Cc:
- Subject: [chef] Re: Different data_bags in production and test-kitchen
- Date: Thu, 20 Feb 2014 15:05:09 +0900
Hi Noah,
Fair enough. I'm actually not a big fan of data bags. It'd be nice if
there is a general purpose LWRP cookbook that could manage users and
also groups.
Thanks,
Mitsutoshi Aoe
2014-02-20 14:52 GMT+09:00 Noah Kantrowitz
<
>:
>
Possibly unhelpful suggestion: stop using data bags. See
>
https://github.com/balanced-cookbooks/balanced-user for an example of a
>
better way :)
>
>
--Noah
>
>
>
>
wrote:
>
>
>
> 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 in
>
> cluded
>
> 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
>
>
Archive powered by MHonArc 2.6.16.