Niraj,

I'll give you an example that works for me. But it uses modules. If you don't 
so far, you really should start.

Given this structure below an environment below '/etc/puppet' on my Puppet 
master:

.
├── manifests
├── modules
│   ├── backup
│   │   ├── files
│   │   └── manifests
│   ├── exim
│   │   ├── manifests
│   │   └── templates
...

Now for copying a file named 'backup-key.dss' to the clients, this file must be 
below 'modules/backup/files'. And the source attribute will look like this:

source => "puppet:///modules/backup/backup-key.dss",

So you may simply want to check your paths.

If this does not work, you should provide your manifest and your directory 
structure.

Cheers,
Bernd

> -----Ursprüngliche Nachricht-----
> Von: puppet-users@googlegroups.com [mailto:puppet-
> us...@googlegroups.com] Im Auftrag von niraj
> Gesendet: Mittwoch, 7. März 2012 12:14
> An: Puppet Users
> Betreff: [Puppet Users] Re: Distributing file over puppet client
> 
> Hi Bernd,
>    I get the following error on doing what you said.
> 
> 
> root@client1:~# puppet agent --test --server='rover.test.com'
> info: Caching catalog for client1.test.com
> info: Applying configuration version '1331112706'
> err: /Stage[main]/Sudo/File[/etc/sudoers]: Could not evaluate: Error
> 400 on SERVER: Permission denied - /etc/puppet/files/etc/sudoers Could
> not retrieve file metadata for puppet:///files/etc/sudoers: Error 400
> on SERVER: Permission denied - /etc/puppet/files/etc/sudoers at /etc/
> puppet/manifests/site.pp:33
> notice: Finished catalog run in 0.47 seconds.
> 
> 
> Can you suggest me some steps where i can copy some files to puppet
> client from start.??
> 
> Thanx
> Niraj
> 
> 
> 
> 
> 
> On Mar 7, 5:39 am, Bernd Adamowicz <bernd.adamow...@esailors.de>
> wrote:
> > That's basically OK, but try
> >
> > source => "puppet:///files/etc/sudoers"
> >
> > instead. This will link automatically to your local host's Puppet
> > master. If you are already working with modules, you should work with
> >
> > source => "puppet:///modules/<yourmodulename>/etc/sudoers"
> >
> > Your file 'sudoers' must then be below a directory 'etc' in your
> 'files' directory in the according module.
> >
> > Bernd
> >
> >
> >
> >
> >
> >
> >
> > > -----Ursprüngliche Nachricht-----
> > > Von: puppet-users@googlegroups.com [mailto:puppet-
> > > us...@googlegroups.com] Im Auftrag von niraj
> > > Gesendet: Mittwoch, 7. März 2012 10:40
> > > An: Puppet Users
> > > Betreff: [Puppet Users] Distributing file over puppet client
> >
> > > Hi All,
> > >         I am very new to puppet and would like to know how to
> > > distribute some files to all the puppet client.
> >
> > > i used the following to do my task.
> > >  edited the site.pp file to below.
> >
> > > class sudo {
> > >     file { "/etc/sudoers":
> > >         owner  => root,
> > >         group  => root,
> > >         mode   => 440,
> > >         source => "puppet://rover.test.com/files/etc/sudoers"
> > >     }
> > > }
> >
> > > node 'client1.test.com' {
> > >      include sudo
> > > }
> >
> > > But i get an error somewhat like this:-
> >
> > > Error 400 on server: Permission denied
> >
> > > Please help me on this or any other method to copy files to puppet
> > > cliend
> >
> > > --
> > > 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.
> 
> 
> --
> 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.

-- 
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