diff options
author | James Turnbull <james@lovedthanlost.net> | 2009-01-23 09:46:18 +1100 |
---|---|---|
committer | James Turnbull <james@lovedthanlost.net> | 2009-01-23 09:46:18 +1100 |
commit | 7c8094c70490e134dcac2fd772de36e5312e8388 (patch) | |
tree | 4627e69910c84b13cc81c6ea2576ad9480ebcfc5 /lib/puppet/type | |
parent | f40a6b1dc5feca966899a112c892f2b4de596bd3 (diff) | |
download | puppet-7c8094c70490e134dcac2fd772de36e5312e8388.tar.gz puppet-7c8094c70490e134dcac2fd772de36e5312e8388.tar.xz puppet-7c8094c70490e134dcac2fd772de36e5312e8388.zip |
Fixed #1879 - Added to tidy documentation
Diffstat (limited to 'lib/puppet/type')
-rwxr-xr-x | lib/puppet/type/tidy.rb | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/lib/puppet/type/tidy.rb b/lib/puppet/type/tidy.rb index 2b0c153f0..a0b0fbe6c 100755 --- a/lib/puppet/type/tidy.rb +++ b/lib/puppet/type/tidy.rb @@ -20,11 +20,21 @@ Puppet::Type.newtype(:tidy) do end newparam(:matches) do - desc "One or more file glob patterns, which restrict the list of - files to be tidied to those whose basenames match at least one - of the patterns specified. Multiple patterns can be specified - using an array. - + desc "One or more (shell type) file glob patterns, which restrict + the list of files to be tidied to those whose basenames match + at least one of the patterns specified. Multiple patterns can + be specified using an array. + + tidy { "/tmp": + age => "1w", + recurse => false, + matches => [ "[0-9]pub*.tmp", "*.temp", "tmpfile?" ] + } + + The example above removes files from /tmp if they are one week + old or older, are not in a subdirectory and match one of the shell + globs given. + Note that the patterns are matched against the basename of each file -- that is, your glob patterns should not have any '/' characters in them, since you're only specifying |