diff --git a/defaults/main.yaml b/defaults/main.yaml index afa93b9..0d462ef 100644 --- a/defaults/main.yaml +++ b/defaults/main.yaml @@ -18,3 +18,4 @@ varnish: 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 + extra_flags: {} diff --git a/tasks/service-FreeBSD.yaml b/tasks/service-FreeBSD.yaml index 10dcb0d..6c5aebd 100644 --- a/tasks/service-FreeBSD.yaml +++ b/tasks/service-FreeBSD.yaml @@ -16,6 +16,10 @@ regexp: "^varnishd_storage=" line: > varnishd_storage="{{ varnish.storage | trim | quote }}" + - rc_conf: /usr/local/etc/rc.conf.d/varnishd + regexp: "^varnishd_extra_flags=" + line: > + varnishd_extra_flags="{%- for flag,value in varnish.extra_flags.items() -%} -p {{ flag }}={{ value }}{%- endfor -%}" - rc_conf: /usr/local/etc/rc.conf.d/varnishncsa regexp: "^varnishncsa_logformat=" line: >