Yes of course this is just to use some anonymous username.

I figured out what went wrong. This had to do something with wrapping
my define and virtual resources in class {}


On Wed, Jun 23, 2010 at 6:38 AM, Joe McDonagh
<[email protected]> wrote:
> On 06/22/2010 08:32 PM, tehcook wrote:
>>
>> Hi
>>
>> New to the puppet. I'm trying to make a user management module
>> "users", which has one definition and a bunch of classes. Here is my
>> structure under $modulepath :
>>
>> users/manifests/classes/evergent.pp
>> users/manifests/classes/admins.pp
>> users/manifests/classes/list.pp
>> users/manifests/classes/outside.pp
>> users/manifests/classes/dbas.pp
>> users/manifests/defines/account.pp
>> users/manifests/init.pp
>>
>> Definition is :
>>
>> define users::account($realname, $userid, $password) {
>>     ....
>> }
>>
>> It creates user, group, $HOME, adds user's public ssh key and chown -R
>> his whole $HOME
>>
>> Then there is a class users::list that has all users like this :
>>
>>         @users::account { "root":
>>                 realname =>  "Root user",
>>                 userid   =>  "1000",
>>                 password =>  "xxxxxxxxxxx",
>>         }
>>
>> The idea is that all users are defined as a "virtual definition" and
>> will be realized later.
>>
>> Now there is class users:admins that has all sysadmins :
>>
>> class users::admins {
>>         realize Users::Account["root"]
>> }
>>
>> Then in site.pp I import my "users" module :
>>
>> import "users"
>>
>> and in one of the nodes I include sysadmins :
>>
>> node "host1.test.com" inherits "default" {
>>         include users::admins
>> }
>>
>> Now when I run puppetd -o -t -v on that node I get error :
>>
>> err: Could not retrieve catalog from remote server: Error 400 on
>> SERVER: Failed to realize virtual resources Users::Account[root] on
>> node host1.test.com
>>
>> Do I do something not supported by the puppet ? I understand everyone
>> suggests making virtual resource user and then realize them in the
>> class. But I want add some thing like chown -R $HOME, ssh keys and
>> more. Can I use virtual definition same way as virtual resources ?
>> What am I doing wrong ? Any pointers to something similar would help a
>> lot. I've checked "Pulling strings with Puppet" book but it does not
>> show any example of the virtual definitions like this.
>>
>> Thanks
>>
>>
>
> Is that just an example or are you actually trying to make an account named
> root with uid 1000?
>
> --
> --
> Joe McDonagh
> Operations Engineer
> AIM: YoosingYoonickz
> IRC: joe-mac on freenode
> "When the going gets weird, the weird turn pro."
>
> --
> 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.

Reply via email to