varnish: config file name is configurable
This commit is contained in:
parent
81fbd98a5f
commit
8861169a04
4 changed files with 9 additions and 8 deletions
|
@ -23,6 +23,7 @@ The **patch** part changes incrementally at each release.
|
|||
* redis: variable to force use of port 6379 in instances mode
|
||||
* redis: check maxmemory in NRPE check
|
||||
* lxc-php: Allow php containers to contact local MySQL with localhost
|
||||
* varnish: config file name is configurable
|
||||
|
||||
### Changed
|
||||
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
#!/bin/sh
|
||||
UUID=`cat /proc/sys/kernel/random/uuid`
|
||||
/usr/sbin/varnishd -C -f /etc/varnish/default.vcl >/dev/null \
|
||||
&&/usr/bin/varnishadm -T localhost:6082 -S /etc/varnish/secret "vcl.load vcl_$UUID /etc/varnish/default.vcl" \
|
||||
&& /usr/bin/varnishadm -T localhost:6082 -S /etc/varnish/secret "vcl.use vcl_$UUID"
|
|
@ -19,8 +19,8 @@
|
|||
- varnish
|
||||
|
||||
- name: Copy Custom Varnish ExecReload script (Debian <=9)
|
||||
copy:
|
||||
src: "reload-vcl.sh"
|
||||
template:
|
||||
src: "reload-vcl.sh.j2"
|
||||
dest: "/etc/varnish/reload-vcl.sh"
|
||||
mode: "0700"
|
||||
owner: root
|
||||
|
@ -62,7 +62,7 @@
|
|||
- name: Copy Varnish configuration
|
||||
template:
|
||||
src: "{{ item }}"
|
||||
dest: /etc/varnish/default.vcl
|
||||
dest: "{{ varnish_config_file }}"
|
||||
mode: "0644"
|
||||
force: yes
|
||||
with_first_found:
|
||||
|
|
5
varnish/templates/reload-vcl.sh.j2
Normal file
5
varnish/templates/reload-vcl.sh.j2
Normal file
|
@ -0,0 +1,5 @@
|
|||
#!/bin/sh
|
||||
UUID=`cat /proc/sys/kernel/random/uuid`
|
||||
/usr/sbin/varnishd -C -f {{ varnish_config_file }} >/dev/null \
|
||||
&& /usr/bin/varnishadm -T {{ varnish_management_address }} -S {{ varnish_secret_file }} "vcl.load vcl_$UUID {{ varnish_config_file }}" \
|
||||
&& /usr/bin/varnishadm -T {{ varnish_management_address }} -S {{ varnish_secret_file }} "vcl.use vcl_$UUID"
|
Loading…
Add table
Reference in a new issue