Hi,
Sorry, just so I'm clear.
You want create a user and a user group, and then add that user to an sshuser
group?
Can you create the user with all those groups by default? I don't see why it
has to be so complicated unless you have something really specific you're
trying to do.
If you want to make it more complicated I would add something like:
users.pp
....
if Class[sshclassname] {
$groups = "sshusers"
...
groups => $groups
...
}
Where you would declare the ssh class for the node then test for the
declaration when you create the user. You can also use a selector if you like.
Not sure if this is best practice though, but easier than custom facts or execs.
Cheers,
Den
On 01/05/2011, at 17:16, "Rakhesh Sasidharan" <[email protected]> wrote:
> On Fri, 29 Apr 2011 17:52 +0400, "Rakhesh Sasidharan"
> <[email protected]> wrote:
>> Hi,
>>
>> I'm new to Puppet. Started using it about a week ago and absolutely
>> loving it!
>>
>> I'm trying to do something which I am not sure if possible or whether I
>> am even approaching it the right way.
>>
>> What I want to do is that by default I want all my machines to have a
>> certain user account created and added to the users group. That's easy.
>> Next, I want certain machines to have the SSH server package installed
>> (again, easy), the SSH config file copied over (easy), a group called
>> sshusers created (easy), and then the above mentioned user accounts be
>> added to this group. I am stuck at the last bit.
>>
>> One obvious solution I can think of is to have an Exec definition where
>> I define the SSH server package to add this user to the group. But that
>> doesn't feel too "neat" to me, so I was wondering if there's a better
>> way of declaring/ defining the fact that when the group is created such
>> and such users are added to it - perhaps using virtual resources or
>> something?
>>
>> Any ideas, please enlighten!
>>
>
> No suggestions, anyone?
>
> Regards.
>
> --
> 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.
>
--
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.