1
0
mirror of https://github.com/krislamo/puppet-rsnapshot synced 2025-09-13 15:59:28 +00:00

fix random number generator so that minute, hour... actually have different random numbers, not the same

This commit is contained in:
Norbert Varzariu
2015-12-21 19:11:26 +01:00
parent 569f38f606
commit c55ec365cc
4 changed files with 48 additions and 187 deletions

View File

@@ -133,11 +133,11 @@ class rsnapshot::config (
$c_month = $rsnapshot::params::cron[$level]['month']
$c_weekday = $rsnapshot::params::cron[$level]['weekday']
}
$minute = rand_from_array($c_min, "${host}.${level}")
$hour = rand_from_array($c_hour, "${host}.${level}")
$monthday = rand_from_array($c_monthday, "${host}.${level}")
$month = rand_from_array($c_month, "${host}.${level}")
$weekday = rand_from_array($c_weekday, "${host}.${level}")
$minute = rand_from_array($c_min, "${host}.${level}.minute")
$hour = rand_from_array($c_hour, "${host}.${level}.hour")
$monthday = rand_from_array($c_monthday, "${host}.${level}.monthday")
$month = rand_from_array($c_month, "${host}.${level}.month")
$weekday = rand_from_array($c_weekday, "${host}.${level}.weekday")
concat::fragment { "${host}.${level}":
target => $cronfile,
content => template('rsnapshot/cron.erb'),