From cb7f7b1bb03ad6636b2c22c525ec29cfd3177d84 Mon Sep 17 00:00:00 2001 From: Kuno Tranelis Date: Thu, 19 Oct 2023 09:25:53 +0200 Subject: [PATCH] FEATURE control storage size decix-web-dev/ansible-proserver#67 --- defaults/main.yaml | 1 + tasks/service.yaml | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/defaults/main.yaml b/defaults/main.yaml index 68d2851..bc783ff 100644 --- a/defaults/main.yaml +++ b/defaults/main.yaml @@ -6,3 +6,4 @@ varnish: #logformat: '%h "%{X-Forwarded-For}i" %u %t "%r" %s %b "%{Referer}i" "%{User-agent}i" "%{Varnish:time_firstbyte}x" %{Varnish:handling}x "%{Content-Type}o" "%{Cookie}i"' logformat: > {"time": %{"%FT%T%z"}t, "remote_addr": "%h","remote_user": "%u","x_forwarded_for": "%{X-Forwarded-For}i","x_real_ip": "%{X-Real-IP}i","x_request_id": "%{X-Request-ID}i","hit_miss": "%{Varnish:hitmiss}x","body_bytes_sent": "%b","request_time": "%{Varnish:time_firstbyte}x","status": "%s","content_type": "%{Content-Type}o","request": "%r","host": "%{host}i","request_method": "%m","time_first_byte": "%{Varnish:time_firstbyte}x","handling": "%{Varnish:handling}x","http_referrer": "%{Referrer}i","http_user_agent": "%{User-agent}i"} + storage: malloc,512M \ No newline at end of file diff --git a/tasks/service.yaml b/tasks/service.yaml index ba31a0e..34c0f93 100644 --- a/tasks/service.yaml +++ b/tasks/service.yaml @@ -8,6 +8,10 @@ regexp: "^varnishd_listen=" line: > varnishd_listen={{ varnish.bind_addr|trim|quote }} + - rc_conf: /usr/local/etc/rc.conf.d/varnishd + regexp: "^varnishd_storage=" + line: > + varnishd_storage="{{ varnish.storage|trim|quote }}" - rc_conf: /usr/local/etc/rc.conf.d/varnishncsa regexp: "^varnishncsa_logformat=" line: >