forked from evolix/ansible-roles
Varnish: fix logrotate replace
it was not idempotent and would add a segment indefinitely
This commit is contained in:
parent
86372199ec
commit
bdf534fdbb
|
@ -32,8 +32,8 @@
|
||||||
- name: Patch logrotate conf
|
- name: Patch logrotate conf
|
||||||
replace:
|
replace:
|
||||||
name: /etc/logrotate.d/varnish
|
name: /etc/logrotate.d/varnish
|
||||||
regexp: "/usr/sbin/invoke-rc.d {{item}} reload.*$"
|
regexp: '^(\s+)(/usr/sbin/invoke-rc.d {{item}}.*)'
|
||||||
replace: "systemctl -q is-active {{item}} && /usr/sbin/invoke-rc.d {{item}} reload > /dev/null ||true"
|
replace: '\1systemctl -q is-active {{item}} && \2'
|
||||||
with_items:
|
with_items:
|
||||||
- varnishlog
|
- varnishlog
|
||||||
- varnishncsa
|
- varnishncsa
|
||||||
|
|
Loading…
Reference in a new issue