- From: jfotop <
>
- To:
- Subject: [chef] Nested Databags
- Date: Wed, 12 Sep 2012 07:21:07 -0700 (PDT)
Hi!!
I'm new to chef and liking it so far. I have a simple question (could be even
called stupid): Could I create a nested databag to create a structure like the
following? :
access_groups = { Developers => { Tim => 10.0.0.1, Brandon=> 10.0.0.2 },
Admins => { Jacob => 10.1.0.1, Curtis => 10.1.0.2, Mary
=> 10.1.0.3},
Sales => { Rebecca => 10.3.0.1, George => 10.3.2.1} }
in one databag?
Use case:
When a node is created, it would set an attribute which is an ldap_group (or
maybe 2 or 3 ldap groups). The ldap_group names correspond to the group names
above. So when I want to configure iptables, I will have to loop over all
specified groups and get every IP from the users in the group(s). I also want
the usernames, because each user in that group will be added to a local group,
in order to grant him sudo access to different stuff.
Any other ideas on how to accomplish this would be appreciated.
- [chef] Nested Databags, jfotop, 09/12/2012
Archive powered by MHonArc 2.6.16.