Fix logrotate error for varnish*

This commit is contained in:
Romain Dessort 2017-03-30 11:54:58 -04:00
parent cda0932aad
commit 0156555920
1 changed files with 9 additions and 0 deletions

View File

@ -28,3 +28,12 @@
src: varnish.conf
dest: /etc/systemd/system/varnish.service.d/
notify: reload systemctl
- name: Patch logrotate conf
replace:
name: /etc/logrotate.d/varnish
regexp: "/usr/sbin/invoke-rc.d {{item}} reload.*$"
replace: "systemctl -q is-active {{item}} && /usr/sbin/invoke-rc.d {{item}} reload > /dev/null ||true"
with_items:
- varnishlog
- varnishncsa