forked from evolix/ansible-roles
varnish: config file name is configurable
This commit is contained in:
parent
81fbd98a5f
commit
8861169a04
|
@ -23,6 +23,7 @@ The **patch** part changes incrementally at each release.
|
||||||
* redis: variable to force use of port 6379 in instances mode
|
* redis: variable to force use of port 6379 in instances mode
|
||||||
* redis: check maxmemory in NRPE check
|
* redis: check maxmemory in NRPE check
|
||||||
* lxc-php: Allow php containers to contact local MySQL with localhost
|
* lxc-php: Allow php containers to contact local MySQL with localhost
|
||||||
|
* varnish: config file name is configurable
|
||||||
|
|
||||||
### Changed
|
### 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
|
- varnish
|
||||||
|
|
||||||
- name: Copy Custom Varnish ExecReload script (Debian <=9)
|
- name: Copy Custom Varnish ExecReload script (Debian <=9)
|
||||||
copy:
|
template:
|
||||||
src: "reload-vcl.sh"
|
src: "reload-vcl.sh.j2"
|
||||||
dest: "/etc/varnish/reload-vcl.sh"
|
dest: "/etc/varnish/reload-vcl.sh"
|
||||||
mode: "0700"
|
mode: "0700"
|
||||||
owner: root
|
owner: root
|
||||||
|
@ -62,7 +62,7 @@
|
||||||
- name: Copy Varnish configuration
|
- name: Copy Varnish configuration
|
||||||
template:
|
template:
|
||||||
src: "{{ item }}"
|
src: "{{ item }}"
|
||||||
dest: /etc/varnish/default.vcl
|
dest: "{{ varnish_config_file }}"
|
||||||
mode: "0644"
|
mode: "0644"
|
||||||
force: yes
|
force: yes
|
||||||
with_first_found:
|
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…
Reference in a new issue