Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
realize virtual definition ?
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  4 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
tehcook  
View profile  
 More options Jun 22 2010, 8:32 pm
From: tehcook <serge...@gmail.com>
Date: Tue, 22 Jun 2010 17:32:44 -0700 (PDT)
Local: Tues, Jun 22 2010 8:32 pm
Subject: realize virtual definition ?
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


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Joe McDonagh  
View profile  
 More options Jun 23 2010, 9:38 am
From: Joe McDonagh <joseph.e.mcdon...@gmail.com>
Date: Wed, 23 Jun 2010 09:38:51 -0400
Local: Wed, Jun 23 2010 9:38 am
Subject: Re: [Puppet Users] realize virtual definition ?
On 06/22/2010 08:32 PM, tehcook wrote:

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 must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
sergei  
View profile  
 More options Jun 23 2010, 12:59 pm
From: sergei <serge...@gmail.com>
Date: Wed, 23 Jun 2010 09:59:11 -0700
Local: Wed, Jun 23 2010 12:59 pm
Subject: Re: [Puppet Users] realize virtual definition ?
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


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
tehcook  
View profile   Translate to Translated (View Original)
 More options Jun 23 2010, 12:52 pm
From: tehcook <serge...@gmail.com>
Date: Wed, 23 Jun 2010 09:52:28 -0700 (PDT)
Local: Wed, Jun 23 2010 12:52 pm
Subject: Re: realize virtual definition ?

On Jun 23, 6:38 am, Joe McDonagh <joseph.e.mcdon...@gmail.com> wrote:

Of course this is just to replace real usernames with something
anynymous.
I actually figured out what was wrong - this was about putting
"classname::" in front of some things and wrapping define in class {}.
Had to tear apart whole thing and make a simple test module.

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »