Reload haproxy configuration when config changes
Add an Ansible handler to send a hangup signal through docker-compose to the running haproxy daemon any time the task to update its configuration fires. Change-Id: I1946c1e7eaaa8a8e2209007b5d065dba952ec6e2
This commit is contained in:
parent
cb33dba40a
commit
df23d48949
4
playbooks/roles/haproxy/handlers/main.yaml
Normal file
4
playbooks/roles/haproxy/handlers/main.yaml
Normal file
@ -0,0 +1,4 @@
|
||||
- name: Reload haproxy
|
||||
shell:
|
||||
cmd: docker-compose kill -s HUP haproxy
|
||||
chdir: /etc/haproxy-docker/
|
@ -19,6 +19,7 @@
|
||||
template:
|
||||
src: haproxy.cfg.j2
|
||||
dest: /var/haproxy/etc/haproxy.cfg
|
||||
notify: Reload haproxy
|
||||
- name: Install docker-compose
|
||||
package:
|
||||
name:
|
||||
|
Loading…
Reference in New Issue
Block a user