| I just ran into this issue as well, where the following code didn't behave as expected:
windows_updates::kb { $kb : |
ensure => 'present', |
kb => $kb, |
notify => Reboot['patch_window_reboot'], |
schedule => 'patch_window' |
} |
|
schedule { 'maintenance_window': |
range => '22:00 - 04:00', |
weekday => 'Saturday', |
} |
|
reboot { 'patch_window_reboot': |
apply => 'finished', |
onlyif => [ 'windows_auto_update' ], |
when => 'pending', |
schedule => 'patch_window' |
} |
The reboot{} resource did get skipped outside of the 'patch_window', but the windows_updates::kb{} resource would still create Exec{} resources that didn't inherit the schedule. This is frustrating to troubleshoot for the end user. |