Issue #2212 has been updated by Luke Kanies. Status changed from Re-opened to Closed
Hari Sekhon wrote: > I'm not sure I've made myself clear: Indeed, you hadn't quite. :) > I did try using purge, recurse and force together in the directory definition > but they had no effect of removing any non-puppet managed files under this or > any subdirectories. The most likely reason is that I am intentionally not > specifying a source. > > I do not simply want to do an rsync delete style operation from one directory > tree to the other. > > I have a dir without a source which is simply there to ensure the directory > exists and has the right permissions and is a dependency of other puppet > resources pulling in various files from other places that vary and are not > static. > > I would like this top level directory to be able to set some kind of purge > that will detect everything under this directory that is not managed by some > other puppet file resource and remove it. > > I have gone around adding lots of files and then forcing a test run but > nothing is removed. I believe from the docs this is because purge only > removes what's not in the source, but in this case there is no source. > > So I suspect that I need some option or behaviour that will allow purge to > work without a source by building a list of managed files/directories > underneath from other puppet resources and then removing everything else. I > also need it to respect ignore as I will want to ignore 2 subdirectories and > their contents. Try the master branch, please, as this should behave correctly there. The problem is that you are specifying the top-level directory should recursively set the owner and mode et al, and this is being interpreted as managing all of the files in the directory. The master branch should not make this interpretation. Please reopen if this does not work in master. ---------------------------------------- Feature #2212: Purging directory contents, excluding files from other puppet resources or specified subdirectories http://projects.reductivelabs.com/issues/2212 Author: Hari Sekhon Status: Closed Priority: Normal Assigned to: Category: file Target version: Complexity: Unknown Affected version: 0.24.7 Keywords: I would really like the ability to tell a directory to purge anything inside that is not specified as another puppet resource elsewhere with the option to exclude certain files or subdirectories from being removed. This is the only way to make sure that the end effect is truly the same as the manifest policy dictates. One obvious usage case would be a chroot jail. You can manage the jail from puppet, but it will only manage the bits of the jail you've specified. If a lesser administrator comes along and makes a mistake by adding something or leaving something he shouldn't in the jail, then puppet would not currently be able to help and the reality would drift away from the puppet manifest without any resolution unless another administrator noticed (which he probably wouldn't since he expects things to be fixed by the policies he wrote). Perhaps this is already possible but it doesn't seem so from the documentation...? -- You have received this notification because you have either subscribed to it, or are involved in it. To change your notification preferences, please click here: http://reductivelabs.com/redmine/my/account --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/puppet-bugs?hl=en -~----------~----~----~----~------~----~------~--~---
