summaryrefslogtreecommitdiffstats
path: root/modules/partofme/manifests/persistent.pp
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2020-07-11 01:55:11 -0400
committerJesse Luehrs <doy@tozt.net>2020-07-11 01:55:11 -0400
commit064fe099898269ee232edf7bb9803c86389b8980 (patch)
tree03c4f6bc0cd11bcf1d1f53486c4a126fa81a995c /modules/partofme/manifests/persistent.pp
parent46259587634a5c95136594e5066372541259e56b (diff)
downloadpuppet-tozt-064fe099898269ee232edf7bb9803c86389b8980.tar.gz
puppet-tozt-064fe099898269ee232edf7bb9803c86389b8980.zip
factor cron jobs out into a helper module
Diffstat (limited to 'modules/partofme/manifests/persistent.pp')
-rw-r--r--modules/partofme/manifests/persistent.pp19
1 files changed, 9 insertions, 10 deletions
diff --git a/modules/partofme/manifests/persistent.pp b/modules/partofme/manifests/persistent.pp
index 57c5e5e..cc12447 100644
--- a/modules/partofme/manifests/persistent.pp
+++ b/modules/partofme/manifests/persistent.pp
@@ -1,20 +1,19 @@
class partofme::persistent {
- include cron
-
file {
"/media":
ensure => directory;
"/media/persistent":
ensure => directory,
require => File["/media"];
- "/etc/cron.weekly/raid-scrub":
- source => 'puppet:///modules/partofme/raid-scrub',
- mode => '0755',
- require => Class['cron'];
- "/etc/cron.hourly/raid-scrub-check":
- source => 'puppet:///modules/partofme/raid-scrub-check',
- mode => '0755',
- require => Class['cron'];
+ }
+
+ cron::job {
+ "raid-scrub":
+ frequency => "weekly",
+ source => 'puppet:///modules/partofme/raid-scrub';
+ "raid-scrub-check":
+ frequency => "hourly",
+ source => 'puppet:///modules/partofme/raid-scrub-check';
}
$fstab_line = "/dev/partofme/data /media/persistent ext4 rw,relatime,noauto 0 2"