In Linux many services require a restart when a config file is changes. Having to do this manually every time you change a configuration can be a pain. So doing this automatically would be great. With SaltStack you can achieve this by using watch in a state.
nginx: service.running: - reload: True - enable: true - watch: - file: nginx file.managed: - name: /etc/nginx/sites-enabled/website - source: salt://nginx/website
By “watching” a different state Salt makes sure to restart the service when the specified state has changed.