Created
April 6, 2013 09:10
-
-
Save yath/5325502 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# managed by Class['common::sleeperservice'] | |
# | |
# sleep some time before running cron jobs | |
sleep <%= delay %>m |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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