Maciej Skrzetuski
2011-Mar-10 17:55 UTC
[Puppet Users] Managing directories recursively and adjust subdirectories permissions?
Hello everybody, I have a strange problem. I manage a directory recursively like this (this part works). class showcase { file { "/opt/files": ensure => directory, owner => "user", group => "group", recurse => true, source => "puppet:///showcase" } } Now, if I want to set permissions on directories included in "/opt/ files", for example "/opt/files/copied_from_master" like this... class showcase { file { "/opt/files": ensure => directory, owner => "user", group => "group", recurse => true, source => "puppet:///showcase" } file { "/opt/files/copied_from_master": mode => 744, recurse => true } } ...my first definition does not work anymore: no new files are copied over to puppets and files are not updated when they change. Any ideas on this? How can I do both, copy files recursively and then change some subdirectory permissions? Kind regards, Maciej -- 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.
Maciej Skrzetuski
2011-Mar-10 18:26 UTC
[Puppet Users] Re: Managing directories recursively and adjust subdirectories permissions?
I would like to add that I have no errors from puppetd when running it in test mode, so that''s strange. -- 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.
Ben Hughes
2011-Mar-11 05:41 UTC
Re: [Puppet Users] Managing directories recursively and adjust subdirectories permissions?
On Thu, Mar 10, 2011 at 09:55:20AM -0800, Maciej Skrzetuski wrote:> Any ideas on this? How can I do both, copy files recursively and then > change some subdirectory permissions?This, I believe (and I''m happy to be corrected), is due to the fix of https://projects.puppetlabs.com/issues/2296 To stop things getting overwritten it prunes the path when it sees overlaps. You just need to specify: file { "/opt/files/copied_from_master": source => "puppet:///showcase/copied_from_master" mode => 744, recurse => true } See if that sorts you out. -- Ben Hughes || http://www.puppetlabs.com/ -- 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.