Last active
November 17, 2017 14:12
-
-
Save tom--/e121361b12b6615bd5447fe944cccb58 to your computer and use it in GitHub Desktop.
Salt orchestration—start a container and wait for its minion
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
start {{ container }}: | |
salt.function: | |
- tgt: {{ host }} | |
- name: lxc.start | |
- arg: | |
- {{ container }} | |
wait for {{ container }} minion: | |
salt.wait_for_event: | |
- name: salt/minion/*/start | |
- id_list: | |
- {{ container }}.{{ host }} | |
- require: | |
- salt: start {{ container }} | |
run utility: | |
salt.function: | |
- tgt: '{{ container }}.{{ host }}' | |
- name: cmd.run | |
- arg: | |
- /path/to/utility | |
- require: | |
- salt: wait for {{ container }} minion |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment