Last active
August 29, 2015 14:04
-
-
Save justlooks/eeb9c1c29beb46daa267 to your computer and use it in GitHub Desktop.
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
my reactor sls file | |
{% if data['data']['initphase'] == 'sync-master-done' %} | |
sync-master-done: | |
cmd.cmd.run: | |
- tgt: 'saltslave' | |
- arg: | |
- /bin/echo sycnmasterok > /tmp/demo;echo second > /tmp/second | |
{% endif %} | |
{% if data['data']['initphase'] == 'format-master-done' %} | |
format-master-done: | |
cmd.cmd.run: | |
- tgt: 'saltslave2' | |
- arg: | |
- /bin/echo masterformatok > /tmp/demo | |
fire-another-event: | |
cmd.cmd.run: | |
- tgt: 'saltslave2' | |
- arg: | |
- salt-call event.fire_master '{"initphase":"sync-master-done"}' 'hadoop' | |
{% endif %} | |
fire event from saltslave2 | |
# salt-call event.fire_master '{"initphase":"format-master-done"}' 'hadoop' | |
# cat /tmp/demo | |
masterformatok | |
no demo & second file found on saltslave host |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment