On Fri, Mar 04, 2011 at 02:24:59AM -0800, aleksey_k wrote:
> On 4 мар, 13:08, Ben Hughes <b...@puppetlabs.com> wrote:
> > On Thu, Mar 03, 2011 at 11:59:25PM -0800, aleksey_k wrote:
> > > > # puppet agent --test
> >
> > Throw a --debug on the end, and it should be a whole more talkative!
> >
> Outpu here -> http://pastebin.com/0GHfkH63
> 
> > You made a class for it? As it sounds like it's not getting called at all.
> >
> Yes.I did a class for this:
> 

Your code

01 class keys {
02  define userkey() {
03    file { "/etc/file/keys/${name}_keys":
04      #ensure => ,
05      owner   => $name,
06      group   => "root",
07      mode    => "440",
08      replace => true,
09      source  => "puppet://server/files/file/keys/${name}_keys",
10      require => User[$name],
11    }
12
13   userkey{ ["user1","user2","user3"]: }
14
15 }

My comments

04: Use `ensure => file` so it is clear that something will be created
08: replace => true is the default so I wont specify it
09: Are you using modules? Maybe you're specifying an incorrect path. Have
    a look at http://docs.puppetlabs.com/guides/modules.html and 
    http://docs.puppetlabs.com/guides/file_serving.html
10: When you specify the owner of the file, puppet will create an
    implicit require you dont dont need that explicit require
12: There is a missing closing bracket for the define

-Stefan

Attachment: pgpIGlyfZy6Uf.pgp
Description: PGP signature

Reply via email to