Re:A Visual Introduction to Chef
by omarqureshi on Friday September 09, 2011 @08:33PM
(#2980360)
For puppet, so long as the service that you have has a stop and start setting (i've not come across one that doesn't) and you've told the service to subscribe to a file for changes - then it should automatically do a stop+start at the very least.
In Puppet you can specify dependencies between Services and Files, so that a service is automatically restarted when a file changes.
The only trick is that Puppet must be aware of the file change. This happens automatically when the file is modified by Puppet. But if it's modified externally by a shell script or a git pull, you need to have Puppet copy that file to another "dummy" file, so it can detect that it changed from the previous version and trigger the restart.
What a "service restart" means can also be configured if you want a SIGHUP or something else. The default is the equivalent of "/etc/init.d/nginx restart".
Puppet is the more mature technology of the two, but (so I'm told) there's an important limitation in that there is no way to automatically e.g. reload the web server if its config file changes. Both these systems have some issues with information flowing in only one direction.