Advertisement
jacksontj

Untitled

Jun 13th, 2013
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.89 KB | None | 0 0
  1. # Command to remove host from LB
  2. remove_from_lb:
  3. cmd.wait:
  4. - name: /home/thjackso/tmp/rotation/oor.sh
  5.  
  6. # Command to add host to LB
  7. add_to_lb:
  8. cmd.wait:
  9. - name: /home/thjackso/tmp/rotation/ir.sh
  10.  
  11.  
  12.  
  13. haproxy:
  14. pkg:
  15. - installed
  16. - watch_in:
  17. - cmd: remove_from_lb
  18. service:
  19. - running
  20. - watch:
  21. - file: /home/thjackso/workspace/salt/atsdeploy/test/haproxy.cfg
  22. - cmd: remove_from_lb
  23. - watch_in:
  24. - cmd: add_to_lb
  25.  
  26. /home/thjackso/workspace/salt/atsdeploy/test/haproxy.cfg:
  27. file.managed:
  28. - source: {{ salt['pillar.get']('haproxy:source', 'http://localhost/cfg/default') }}
  29. - user: thjackso
  30. - group: eng
  31. - mode: 644
  32. - source_hash: {{ salt['pillar.get']('haproxy:hash', 'md5=33edb5b1b9f33892dfe5e8a8feff9794') }}
  33. - watch_in:
  34. - cmd: remove_from_lb
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement