Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- root@xubuntu:/srv/salt# cat top.sls
- base:
- '*':
- - test
- root@xubuntu:/srv/salt# cat test.sls
- /etc/supervisor/conf.d/test.conf:
- file.managed:
- - source: salt://test.conf
- - user: root
- - group: root
- test:
- supervisord.running:
- - require:
- - file: /etc/supervisor/conf.d/test.conf
- root@xubuntu:/srv/salt# cat test.conf
- [program:test]
- command=/bin/cat
- root@xubuntu:/srv/salt# salt xubuntu state.highstate
- xubuntu:
- ----------
- State: - file
- Name: /etc/supervisor/conf.d/test.conf
- Function: managed
- Result: True
- Comment: File /etc/supervisor/conf.d/test.conf updated
- Changes: diff: New file
- ----------
- State: - supervisord
- Name: test
- Function: running
- Result: False
- Comment: test: ERROR (already started)
- Changes:
- Summary
- ------------
- Succeeded: 1
- Failed: 1
- ------------
- Total: 2
- Rerunning
- root@xubuntu:/srv/salt# salt xubuntu state.highstate
- xubuntu:
- ----------
- State: - file
- Name: /etc/supervisor/conf.d/test.conf
- Function: managed
- Result: True
- Comment: File /etc/supervisor/conf.d/test.conf is in the correct state
- Changes:
- ----------
- State: - supervisord
- Name: test
- Function: running
- Result: True
- Comment: Not starting already running service: test
- Changes: test: Updating supervisor
- Summary
- ------------
- Succeeded: 2
- Failed: 0
- ------------
- Total: 2
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement