So I have see the resource schedule in puppet. But it's not clear if I can have a complex schedule. If I want to install packages only Monday 10PM-3AM or Tuesday 10AM-Noon, unless a (external fact provided by another system) is true, what might be the best way to do that? Do I need to create 2 schedule resources, 2 package resources each with a different schedule, but otherwise the same (maybe a define helps here?) as well as a package resource without a schedule wrapped in an if $fact == true statement?
I'm looking at doing the if statements, and that will handle the flag I'm talking about. Can I pass 2 or more schedules though to a resource?
I.e.
schedule { 'monday_updates':
range => '22:00 - 03:00',
weekday => 'Monday',
}
schedule { 'tuesday_updates':
range => '10:00 - 12:00',
weekday => 'Tuesday',
}
$updates = ['monday_updates','tuesday_updates']
package { $additionalwindowspackages:
ensure => latest,
provider => 'chocolatey',
schedule => $updates,
}