(#19162) Finish applying, then shut down

Added when => :end to allow Puppet to finish and then reboot the computer at
the end.