Restart varnish on changes

This commit is contained in:
Kevin Fenzi 2015-01-06 22:19:18 +00:00
parent 18d7401265
commit 538f1bec6a
2 changed files with 9 additions and 0 deletions

View file

@ -144,3 +144,6 @@
- name: restart haproxy
service: name=haproxy state=restarted
- name: restart varnish
service: name=varnish state=restarted

View file

@ -13,6 +13,8 @@
owner=root group=root
with_items:
- { file: varnish, dest: /etc/sysconfig/varnish }
notify:
- restart varnish
- name: install /etc/varnish/default.vcl - stg
copy: src={{ item }} dest=/etc/varnish/default.vcl
@ -20,6 +22,8 @@
with_items:
- proxy.vcl.stg
when: env == 'staging'
notify:
- restart varnish
- name: install /etc/varnish/default.vcl - prod
copy: src={{ item }} dest=/etc/varnish/default.vcl
@ -27,3 +31,5 @@
with_items:
- proxy.vcl
when: env != 'staging'
notify:
- restart varnish