Puppet Class: psick::schedule
- Defined in:
- manifests/schedule.pp
Overview
This class defines Puppet schedules which might be used in other parts of the code.
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
# File 'manifests/schedule.pp', line 4
class psick::schedule (
Boolean $add_default_schedules = true,
Hash $schedules_hash = {},
Optional[Integer] $repeat = undef,
Boolean $manage = $psick::manage,
Boolean $noop_manage = $psick::noop_manage,
Boolean $noop_value = $psick::noop_value,
) {
if $manage {
if $noop_manage {
noop($noop_value)
}
Schedule {
repeat => $repeat,
}
if $add_default_schedules {
schedule { 'working_hours':
range => '09:00 - 18:00',
}
schedule { 'weekend':
weekday => ['sat','sun'],
}
schedule { 'working_days':
weekday => ['mon','tues','wed','thurs','fri'],
repeat => 2,
}
schedule { 'nightly_maintenance':
range => '02:00 - 05:00',
}
schedule { 'evening':
range => '21:00 - 0:00',
}
}
$schedules_hash.each | $k, $v | {
schedule { $k:
* => $v,
}
}
}
}
|