On Mon, Jul 02, 2012 at 12:20:40PM -0500, Tim Mooney wrote:
> >  How to ensure groups dependencies at user creation ?.
> 
> If you were just talking about the user's default group, then it would
> be one of the few cases where puppet establishes an ordering relation
> for you automatically.  In other words:
> 
>    user { 'foo':
>      gid => 'bar',
>    }
> 
> automatically ensures that group 'bar' is present before user 'foo'.
> 
> I don't know if that same thing is true for supplemental groups

It is also true for supplemental groups. You can see puppet creates the
relationship when you run puppet agent / puppet apply in debug mode.

So when I run

    # puppet apply -vd --noop << EOF
    group { ['foo', 'bar']:ensure => present }
    user { 'bob': groups => [ 'foo', 'bar' ], ensure => present }
    EOF

I get

    debug: /Stage[main]//User[bob]: Autorequiring Group[bar]
    debug: /Stage[main]//User[bob]: Autorequiring Group[foo]

-Stefan

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

Reply via email to