HI How can i copy a directory from puppet master to client I have tried this, but its giving error. I am using redhat 5.6 and puppet 2.6.8 file { "/usr": ensure => "directory", owner => "root", group => "root", mode => 777, content => template("/usr/local/sbin/), Please help me.. -- * Regards*** * Sumith** * -- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Try looking into the recurse => true parameter. -- Nathan Clemons http://www.livemocha.com The worlds largest online language learning community On Mon, May 23, 2011 at 3:05 AM, Sumith Sudhakaran <sumithtm@gmail.com>wrote:> HI > > How can i copy a directory from puppet master to client > > I have tried this, but its giving error. I am using redhat 5.6 and puppet > 2.6.8 > > file { "/usr": > ensure => "directory", > owner => "root", > group => "root", > mode => 777, > content => template("/usr/local/sbin/), > > Please help me.. > -- > * Regards*** > > * Sumith** * > > -- > 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+unsubscribe@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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Hi, You''ve got it a bit wrong. Here is what I think you''re trying to do: http://docs.puppetlabs.com/guides/techniques.html#how-can-i-manage-whole-directories-of-files-without-explicitly-listing-the-files I think if you''re starting out, you should try something simpler and less likely to destroy your system :) http://docs.puppetlabs.com/learning/manifests.html#resource-declarations For complete file type reference: http://docs.puppetlabs.com/references/stable/type.html#file> content => template("/usr/local/sbin/),That does not work like you think it does. It is for file templates using ERB. For recursive directories you need something like: source => puppet:///module/name/somedirectory Cheers, Den On 23/05/2011, at 20:05, Sumith Sudhakaran <sumithtm@gmail.com> wrote:> HI > > How can i copy a directory from puppet master to client > > I have tried this, but its giving error. I am using redhat 5.6 and puppet 2.6.8 > > file { "/usr": > ensure => "directory", > owner => "root", > group => "root", > mode => 777, > content => template("/usr/local/sbin/), > > Please help me.. > -- > Regards > > Sumith > > -- > 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+unsubscribe@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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Hi, Now i am getting error like: err: /Stage[main]//File[/usr/local/sbin]: Failed to generate additional resources using ''eval_generate'': Error 400 on SERVER: Not authorized to call search on /file_metadata/usr/local/sbin with {:recurse=>true, :links=>"manage", :checksum_type=>"md5"} On Mon, May 23, 2011 at 4:17 PM, Denmat <tu2bgone@gmail.com> wrote:> Hi, > > You''ve got it a bit wrong. > > Here is what I think you''re trying to do: > > http://docs.puppetlabs.com/guides/techniques.html#how-can-i-manage-whole-directories-of-files-without-explicitly-listing-the-files > > I think if you''re starting out, you should try something simpler and less > likely to destroy your system :) > > http://docs.puppetlabs.com/learning/manifests.html#resource-declarations > > For complete file type reference: > http://docs.puppetlabs.com/references/stable/type.html#file > > content => template("/usr/local/sbin/), > > > That does not work like you think it does. It is for file templates using > ERB. For recursive directories you need something like: > > source => puppet:///module/name/somedirectory > > Cheers, > Den > > On 23/05/2011, at 20:05, Sumith Sudhakaran <sumithtm@gmail.com> wrote: > > HI > > How can i copy a directory from puppet master to client > > I have tried this, but its giving error. I am using redhat 5.6 and puppet > 2.6.8 > > file { "/usr": > ensure => "directory", > owner => "root", > group => "root", > mode => 777, > content => template("/usr/local/sbin/), > > Please help me.. > -- > * Regards*** > > * Sumith** * > > -- > 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+unsubscribe@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+unsubscribe@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/puppet-users?hl=en. >-- * Regards*** * Sumith** * -- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
You''ll have to copy the entire contents of /usr into the Puppet tree to do this, you can''t serve it in place. I wouldn''t do what you''re doing anyway. Puppet is great for serving config files but for serving all of /usr I''d choose either NFS or rsync and call your sync script from Puppet. On May 23, 2011 4:09 AM, "Sumith Sudhakaran" <sumithtm@gmail.com> wrote: -- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
On Mon, May 23, 2011 at 10:08 AM, Aaron Grewell <aaron.grewell@gmail.com> wrote:> You''ll have to copy the entire contents of /usr into the Puppet tree to do > this, you can''t serve it in place. I wouldn''t do what you''re doing anyway. > Puppet is great for serving config files but for serving all of /usr I''d > choose either NFS or rsync and call your sync script from Puppet.I find myself using something like this fairly often: $rsync_html = "/usr/bin/rsync -a $user@$host:$svnfolder/html/ $approot/html --exclude=.svn --delete" exec { $rsync_html: onlyif => "test `$rsync_html --dry-run --itemize-changes | wc -l` -gt 0" } -- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.