Last active
May 1, 2019 18:46
-
-
Save jfindlay/cacfda0c6657a0ca13028b7c4c545671 to your computer and use it in GitHub Desktop.
Equivalent of `service.running`+`watch`
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Watch version | |
my-file-watch: | |
file.managed: | |
- name: /etc/file.conf | |
- source: salt://file.conf | |
my-service-watch: | |
service.running: | |
- name: my-service | |
- watch: | |
- file: my-file-watch | |
# Require+onchanges version: requires (hah) `use_superseded: [module.run]` in minion config | |
my-file-onchanges: | |
file.managed: | |
- name: /etc/file.conf | |
- source: salt://file.conf | |
my-service-onchanges: | |
service.running: | |
- name: my-service | |
- require: | |
- file: my-file-watch | |
module.run: | |
- service.reload: | |
- my-service | |
- require: | |
- file: my-file-onchanges | |
- onchanges: | |
- file: my-file-onchanges |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment