#!/bin/sh | |
# managed by Class['common::sleeperservice'] | |
# | |
# sleep some time before running cron jobs | |
sleep <%= delay %>m |
class common::sleeperservice { | |
$delay = fqdn_rand(120) | |
# suffix() is in https://github.com/puppetlabs/puppetlabs-stdlib/commit/88a93ac6cdf38045e1cf29325a70e5e4143016b3 | |
$files = regsubst(prefix(['daily', 'weekly', 'monthly'], '/etc/cron.'), '$', '/000-sleeper-service') | |
file{$files: | |
ensure => present, | |
content => template('common/sleeper-service.erb'), | |
mode => '0755', | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment