saltstack/salt — Issue #663: Service state: watch directory for changes
Author: j0nes2k
Created: 2012-02-09 09:32:29+00:00
State: open

In the service state, it is only possible to watch a single file (e.g. configuration file) for changes to restart the corresponding service afterwards. Some services (like munin) keep their configuration files split up into a lot of text files, or (like munin) they use a plugin system that keeps all plugins in a directory. In these cases, restarting the service is necessary when a file is added or changed in this directory. It should be possible for salt to watch a directory (not just a single file) for changes.

Example:
munin-node:
pkg:
- installed
service:
- running
- watch: /etc/munin/plugins