diff options
author | Michael Scherer <misc@mageia.org> | 2012-03-07 21:10:15 +0000 |
---|---|---|
committer | Michael Scherer <misc@mageia.org> | 2012-03-07 21:10:15 +0000 |
commit | ac317455c4d71d256128ac4c64e559b64a736f32 (patch) | |
tree | cedc855ae3a4fddc2b3a50e8371accf0177f2e51 /modules/mirror_cleaner | |
parent | 4c7c809d82fcfd5d1968d388695a05e0b7344229 (diff) | |
download | puppet-ac317455c4d71d256128ac4c64e559b64a736f32.tar puppet-ac317455c4d71d256128ac4c64e559b64a736f32.tar.gz puppet-ac317455c4d71d256128ac4c64e559b64a736f32.tar.bz2 puppet-ac317455c4d71d256128ac4c64e559b64a736f32.tar.xz puppet-ac317455c4d71d256128ac4c64e559b64a736f32.zip |
split and clean mirrir_cleaner module
Diffstat (limited to 'modules/mirror_cleaner')
-rw-r--r-- | modules/mirror_cleaner/manifests/base.pp | 6 | ||||
-rw-r--r-- | modules/mirror_cleaner/manifests/init.pp | 32 | ||||
-rw-r--r-- | modules/mirror_cleaner/manifests/orphans.pp | 22 |
3 files changed, 29 insertions, 31 deletions
diff --git a/modules/mirror_cleaner/manifests/base.pp b/modules/mirror_cleaner/manifests/base.pp new file mode 100644 index 00000000..8ef82856 --- /dev/null +++ b/modules/mirror_cleaner/manifests/base.pp @@ -0,0 +1,6 @@ +class mirror_cleaner::base { + file { '/usr/local/bin/orphans_cleaner.pl': + mode => '0755', + source => 'puppet:///modules/mirror_cleaner/orphans_cleaner.pl', + } +} diff --git a/modules/mirror_cleaner/manifests/init.pp b/modules/mirror_cleaner/manifests/init.pp index 7602c08f..615b4ffe 100644 --- a/modules/mirror_cleaner/manifests/init.pp +++ b/modules/mirror_cleaner/manifests/init.pp @@ -1,31 +1 @@ -class mirror_cleaner { - class base { - file { "/usr/local/bin/orphans_cleaner.pl": - mode => 755, - source => 'puppet:///modules/mirror_cleaner/orphans_cleaner.pl', - } - } - - define orphans($base) { - include mirror_cleaner::base - - $orphan_dir = "/distrib/archive/orphans" - - file { $orphan_dir: - ensure => directory - } - - cron { "clean orphans $name": - command => "/usr/local/bin/orphans_cleaner.pl $base/$name $orphan_dir", - hour => 5, - minute => 30, - user => root, - } - - tidy { $orphan_dir: - age => "4w", - recurse => true, - matches => ["*.rpm"], - } - } -} +class mirror_cleaner { } diff --git a/modules/mirror_cleaner/manifests/orphans.pp b/modules/mirror_cleaner/manifests/orphans.pp new file mode 100644 index 00000000..c04192f6 --- /dev/null +++ b/modules/mirror_cleaner/manifests/orphans.pp @@ -0,0 +1,22 @@ +define mirror_cleaner::orphans($base) { + include mirror_cleaner::base + + $orphan_dir = '/distrib/archive/orphans' + + file { $orphan_dir: + ensure => directory + } + + cron { "clean orphans $name": + command => "/usr/local/bin/orphans_cleaner.pl $base/$name $orphan_dir", + hour => 5, + minute => 30, + user => root, + } + + tidy { $orphan_dir: + age => '4w', + recurse => true, + matches => ['*.rpm'], + } +} |