Skip to content

Instantly share code, notes, and snippets.

@corywright
Created October 14, 2016 15:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save corywright/361896ab45ce6748a74f4c1e6973457f to your computer and use it in GitHub Desktop.
Save corywright/361896ab45ce6748a74f4c1e6973457f to your computer and use it in GitHub Desktop.
haproxy:
pkg.installed
/etc/haproxy/haproxy.cfg:
file.managed:
- source: salt://proxy/etc/haproxy/haproxy.cfg
- require:
- pkg: haproxy
service-haproxy:
service.running:
- name: haproxy
- watch:
- pkg: haproxy
service-haproxy-reload:
service.running:
- name: haproxy
- reload: True
- onlyif: haproxy -f /etc/haproxy/haproxy.cfg -c
- watch:
- file: /etc/haproxy/haproxy.cfg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment