salt/minion: only restart salt-minion on config/pkg change

Signed-off-by: Joe Groocock <me@frebib.net>
This commit is contained in:
Joe Groocock 2020-07-19 15:21:09 +01:00
parent 37e659cfc3
commit 8024449e2b
Signed by: frebib
GPG Key ID: E0B16BEACFBB6A86

View File

@ -11,10 +11,10 @@ salt-minion:
restart-salt-minion: restart-salt-minion:
cmd.run: cmd.run:
- name: "sleep 10 && systemctl restart salt-minion --no-block" - name: sleep 10 && systemctl restart salt-minion
- bg: true - bg: true
- order: last - order: last
- watch: - onchanges:
- pkg: salt-minion - pkg: salt-minion
- file: /etc/salt/minion - file: /etc/salt/minion
- require: - require:
@ -34,6 +34,7 @@ restart-salt-minion:
check-minion-config: check-minion-config:
cmd.run: cmd.run:
- name: sudo salt-call --local --skip-grains test.ping - name: sudo salt-call --local --skip-grains test.true
- watch: - onchanges:
- pkg: salt-minion
- file: /etc/salt/minion - file: /etc/salt/minion