-
I have a use for schedule resources (maintenance windows), and I'm trying them in a test scenario, but it doesn't seem to be working. I created this class: class sched_test (
Optional[Hash] $sched = {range => '0 - 23','period' => 'never'},
){
$sched_period = $sched.dig('period')
$sched_periodmatch = $sched.dig('periodmatch')
$sched_range = $sched.dig('range')
$sched_repeat = $sched.dig('repeat')
$sched_weekday = $sched.dig('weekday')
schedule { 'test-schedule':
period => $sched_period,
periodmatch => $sched_periodmatch,
range => $sched_range,
repeat => $sched_repeat,
weekday => $sched_weekday,
}
schedule { 'fixed-schedule':
period => 'daily',
range => '18:00 - 20:00',
repeat => 1,
}
schedule { 'broken-schedule':
period => 'daily',
range => '18:00 - 20;00',
repeat => 1,
}
$sched_string = "p: ${sched_period}; pm: ${sched_periodmatch}; ra: ${sched_range}; re: ${sched_repeat}; wd: ${sched_weekday}"
exec { 'test-command':
command => "/usr/bin/logger -t 'puppet-test' 'Time: ${strftime('%Y-%m-%dT%H:%M:%S%:z')}|schedule:: ${sched_string}'",
schedule => 'fixed-schedule',
}
} Regardless of which schedule resource's name I use in the Am I missing something? Puppet agent: 6.28.0 Updates:
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Problem solved. I found that the |
Beta Was this translation helpful? Give feedback.
Problem solved. I found that the
ignoreschedules
config setting had been set totrue
.