Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Command to remove host from LB
- remove_from_lb:
- cmd.wait:
- - name: /home/thjackso/tmp/rotation/oor.sh
- # Command to add host to LB
- add_to_lb:
- cmd.wait:
- - name: /home/thjackso/tmp/rotation/ir.sh
- haproxy:
- pkg:
- - installed
- - watch_in:
- - cmd: remove_from_lb
- service:
- - running
- - watch:
- - file: /home/thjackso/workspace/salt/atsdeploy/test/haproxy.cfg
- - cmd: remove_from_lb
- - watch_in:
- - cmd: add_to_lb
- /home/thjackso/workspace/salt/atsdeploy/test/haproxy.cfg:
- file.managed:
- - source: {{ salt['pillar.get']('haproxy:source', 'http://localhost/cfg/default') }}
- - user: thjackso
- - group: eng
- - mode: 644
- - source_hash: {{ salt['pillar.get']('haproxy:hash', 'md5=33edb5b1b9f33892dfe5e8a8feff9794') }}
- - watch_in:
- - cmd: remove_from_lb
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement