Say we have a directory called /FOO-- we want to only have in it what
puppet puts into it. I want to remove any symlinks, empty directories,
or files in it that don't belong -- but only one level deep.  If the
subdirectory has content, I don't want it removed -- ideally, I'd like
a failure.  This is because we might have some systems misconfigured
(prior to deploying puppet) and we want to manually fix them -- the
content in /FOO/bar might be important.

Hmm - maybe this is a case for audit?  ...but doesn't seem to fit what
I want to do.  Maybe it doesn't work in command line mode since there
isn't a history recorded.

I've been trying

puppet resource file /tmp/empty_me ensure=directory purge=true
source=/tmp/empty recurse=true recurselimit=1 force=true

recurselimit=0 does nothing.  recurselimit=1 stll causes the
directory's contents to be removed.  Without force, empty directories
aren't removed.  Without recurse my directory isn't purged.

Any ideas?  Is this possible to do without making my own file resource type?

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