Try using: ingroups => ['wheel', 'devel']

On Jul 23, 2009, at 13:18, Bryan Ross <br...@liquidstate.net> wrote:

>
> Hi,
>
> I've read puppet isn't great at handling lots of users, but I've got a
> small user base and all my servers are geographically distributed and
> hidden behind various firewalls/vpns, making them unsuitable for
> centralised authentication that requires a constant connection (eg.
> LDAP).
>
> We've previously just distributed /etc/passwd and /etc/group files,
> but I'm hoping that we could build something better into our new
> Puppet deployments.  Unfortunately, I'm getting the following error
> when I try to add a user to multiple groups.  This seems like quite a
> simple requirement (aren't they always?) ... so, I'm wondering whether
> I just completely misunderstand the use of the '+>' operator, or if
> I'm thinking about this the wrong way.
>
> Any help gratefully received!
>
> Thanks,
> Bryan
>
>
> Below code snippet also available at http://pastie.org/556860.
>
> [r...@testnode]# puppetd
> err: Could not retrieve catalog: Parameter 'groups' is already set on
> User[bryan] by user::groupA
> ________________________________________________________________________


> **site.pp**
> node testnode {
>  include user::groupA
>  include user::groupB
> }
>
> class user::groupA inherits user::virtual {
>        User["bryan"]   { groups +> "groupA" }
>        User["bob"]     { groups +> "groupA" }
>
>        realize(
>                Group["groupA"],
>                User["bryan"],
>                User["bob"],
>        )
> }
>
> class user::groupB inherits user::virtual {
>        User["harry"]   { groups +> "groupB" }
>        User["bryan"]   { groups +> "groupB" }
>
>        realize(
>                Group["groupB"],
>                User["harry"],
>                User["bryan"],
>        )
> }
>
> class user::virtual {
>    @user { "bryan":
>        uid     => 1001,
>        gid     => 1001,
>    }
>
>    @user { "bob":
>        uid     => 1002,
>        gid     => 1002,
>    }
>
>    @user { "harry":
>        uid     => 1003,
>        gid     => 1003,
>    }
> }
>
> >

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to