Restart haproxy after config update
This commit is contained in:
parent
324779932b
commit
0f0dd44989
@ -9,9 +9,15 @@
|
||||
- file: state=directory path=/etc/solar/{{name}}
|
||||
# TODO Remove hardcoded path
|
||||
- template: src=/vagrant/examples/resources/templates/haproxy.cfg.j2 dest=/etc/solar/{{name}}/haproxy.cfg backup=yes
|
||||
notify:
|
||||
- haproxy_reload_config
|
||||
- shell: docker run -d \
|
||||
--net="host" \
|
||||
--privileged \
|
||||
-v /etc/solar/{{name}}/haproxy.cfg:/usr/local/etc/haproxy/haproxy.cfg:ro \
|
||||
--name {{name}} {{image}}
|
||||
when: is_running|failed
|
||||
|
||||
handlers:
|
||||
- name: haproxy_reload_config
|
||||
shell: docker restart {{name}}
|
||||
|
@ -1,6 +1,6 @@
|
||||
global
|
||||
maxconn 4096
|
||||
pidfile /var/run/haproxy.pidfile
|
||||
pidfile /var/run/haproxy.pid
|
||||
defaults
|
||||
mode tcp
|
||||
timeout connect 5s
|
||||
|
Loading…
Reference in New Issue
Block a user