/[adm]/puppet/modules/mirror_cleaner/manifests/init.pp
ViewVC logotype

Contents of /puppet/modules/mirror_cleaner/manifests/init.pp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1901 - (show annotations) (download)
Fri Jul 22 10:26:11 2011 UTC (10 years, 4 months ago) by misc
File size: 830 byte(s)
remove trailing slash ( https://projects.puppetlabs.com/issues/5221 )

1 class mirror_cleaner {
2 class base {
3 file { "/usr/local/bin/orphans_cleaner.pl":
4 ensure => present,
5 owner => root,
6 group => root,
7 mode => 755,
8 source => 'puppet:///modules/mirror_cleaner/orphans_cleaner.pl',
9 }
10 }
11
12 define orphans($base) {
13 include mirror_cleaner::base
14
15 $orphan_dir = "/distrib/archive/orphans"
16
17 file { $orphan_dir:
18 ensure => directory
19 }
20
21 cron { "clean orphans $name":
22 command => "/usr/local/bin/orphans_cleaner.pl $base/$name $orphan_dir",
23 hour => 5,
24 minute => 30,
25 user => root,
26 }
27
28 tidy { $orphan_dir:
29 age => "4w",
30 recurse => true,
31 matches => ["*.rpm"],
32 }
33 }
34 }

  ViewVC Help
Powered by ViewVC 1.1.28