Created
March 29, 2016 19:49
-
-
Save Spankalish/398cb86573140054df3fddfea8f1c16f 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
reactor.conf, in master.d--- | |
reactor: | |
- salt/states/base/nginx: | |
- /srv/salt/reactor/stop.sls | |
event on web server--- | |
disable_server_in_LB: | |
event: | |
- wait | |
- name: salt/states/base/nginx | |
- data: | |
id: {{ salt['grains.get']('host') }} | |
- watch: | |
- service: nginx | |
/srv/salt/reactor/stop.sls--- | |
disable server in haproxy: | |
local.cmd.run: | |
- name: disable server in LB | |
- tgt: 'LB' | |
- arg: | |
- echo "disable server here/%s | socat stdio /etc/haproxy/haproxysock"|format(data['id']) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment