Issue #2212 has been updated by Hari Sekhon.

Status changed from Rejected to Re-opened

I'm not sure I've made myself clear:

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.

Nice and simple, eh?
----------------------------------------
Feature #2212: Purging directory contents, excluding files from other puppet 
resources or specified subdirectories
http://projects.reductivelabs.com/issues/2212

Author: Hari Sekhon
Status: Re-opened
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to