Skip to content

Commit

Permalink
Add an option to specify extra flags for varnishd
Browse files Browse the repository at this point in the history
  • Loading branch information
medanthelinium committed Jan 7, 2025
1 parent b9df23b commit 8c11e8f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions defaults/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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: {}
4 changes: 4 additions & 0 deletions tasks/service-FreeBSD.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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: >
Expand Down

0 comments on commit 8c11e8f

Please sign in to comment.