On 4 мар, 11:00, Ben Hughes <b...@puppetlabs.com> wrote:
> On Thu, Mar 03, 2011 at 09:39:02PM -0800, aleksey_k wrote:
> > Hi. i have "keys" class where I copy some files from puppet server.
>
> You're trying to do ERB templating in a manifest. You can't do that.
>
> You could use the ruby DSL, or in puppet language, try the following:
>
> define userkey() {
>     file { "/etc/file/keys/${name}_keys":
>             owner   => $name,
>             group   => root,
>             mode    => "0440",
>             replace => true,
>             source  => "puppet://server/files/file/keys/${name}_keys",
>             require => User[$name],
>     }
>
> }
>
> userkey{ ["user1","user2","user3"]:
>
> }
>
> --
> Ben Hughes ||http://www.puppetlabs.com/

Hi. I done that:
#cat keys.pp
class keys {

        define userkey() {
        file { "/etc/file/keys/${name}_keys":
                #ensure => ,
                owner   => $name,
                group   => "root",
                mode    => "440",
                replace => true,
                source  => "puppet://server/files/file/keys/${name}
_keys",
                require => User[$name],
        }


        userkey{ ["user1","user2","user3"]:

        }
}

But puppet client don't copy file from puppet server :(

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

Reply via email to