Fix Varnish systemd unit
We need to switch to copy module instead of ini_file since it doe not support putting the same key multiple times in a section.
This commit is contained in:
parent
6b3b693501
commit
4be248ce58
4
varnish/files/varnish.conf
Normal file
4
varnish/files/varnish.conf
Normal file
|
@ -0,0 +1,4 @@
|
|||
[Service]
|
||||
ExecStart=
|
||||
ExecStart=/usr/sbin/varnishd -a 0.0.0.0:80 -T localhost:6082 -f /etc/varnish/default.vcl -S /etc/varnish/secret -s malloc,2G -p thread_pools=2 -p thread_pool_add_delay=2 -p thread_pool_min=500 -p thread_pool_max=5000
|
||||
ExecReload=/etc/varnish/reload-vcl.sh
|
|
@ -24,12 +24,7 @@
|
|||
state: directory
|
||||
|
||||
- name: Modify Varnish configuration files
|
||||
ini_file:
|
||||
dest: /etc/systemd/system/varnish.service.d/varnish.conf
|
||||
section: Service
|
||||
option: "{{ item.option }}"
|
||||
value: "{{ item.value }}"
|
||||
copy:
|
||||
src: varnish.conf
|
||||
dest: /etc/systemd/system/varnish.service.d/
|
||||
notify: reload systemctl
|
||||
with_items:
|
||||
- { option: ExecStart, value: "/usr/sbin/varnishd -a 0.0.0.0:80 -T localhost:6082 -f /etc/varnish/default.vcl -S /etc/varnish/secret -s malloc,{{ malloc }} -p thread_pools={{ thread_pools }} -p thread_pool_add_delay=2 -p thread_pool_min=500 -p thread_pool_max=5000 "}
|
||||
- { option: ExecReload, value: "/etc/varnish/reload-vcl.sh" }
|
||||
|
|
Loading…
Reference in a new issue