On Monday, January 27, 2014 1:50:24 PM UTC-6, Bret Wortman wrote: > > I'm looking at the case of distributing /etc/cups/printers.conf. > > When this file changes, I'd like to distribute it. But before placing the > new file, cupsd needs to be shut down, and restarted again afterwards. This > can be done easily enough using an Exec to shut it down and the existing > Service entry to trigger a restart, but how can I tell my manifest that > when the File triggers, first do the Exec, then the File, then the Service? > > Is there a way to chain these together to produce the effect I'm looking > for? To stop a service before deploying a new config file, then start it up > again? >
No easy way to do that, no. On the other hand, it's probably not necessary. You should be able to put the new config in place first, then trigger a service restart; it is a rare service that cannot be updated in that way. Moreover, it makes the length of the service interruption slightly shorter, and it does not leave the service down if the file update fails for some reason. Your manifest will also be simpler. Just remove the Exec, and you should be good to go. John -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/fddddd78-f5e9-4fa2-82c4-37a5eaef0d8a%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.