varnish: custom reload script is now useless
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/pr Build is passing Details

This commit is contained in:
Jérémy Lecour 2020-12-20 23:25:34 +01:00 committed by Jérémy Lecour
parent 0f5ce44186
commit 67ce8de85e
5 changed files with 30 additions and 11 deletions

View File

@ -35,6 +35,7 @@ The **patch** part changes incrementally at each release.
* tomcat-instance: fail if uid already exists * tomcat-instance: fail if uid already exists
* varnish: change template name for better readability * varnish: change template name for better readability
* varnish: no threadpool delay by default * varnish: no threadpool delay by default
* varnish: no custom reload script for Debian 10 and later
### Fixed ### Fixed

View File

@ -18,14 +18,14 @@
tags: tags:
- varnish - varnish
- name: Copy Custom Varnish ExecReload script (Debian <=9) - name: Copy Custom Varnish ExecReload script (Debian <10)
template: template:
src: "reload-vcl.sh.j2" 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
group: root group: root
when: ansible_distribution_major_version is version('9', '<=') when: ansible_distribution_major_version is version('10', '<')
notify: reload varnish notify: reload varnish
tags: tags:
- varnish - varnish
@ -37,11 +37,24 @@
tags: tags:
- varnish - varnish
- name: Override Varnish systemd unit - name: Override Varnish systemd unit (Stretch and before)
template: template:
src: varnish.conf.j2 src: varnish.conf.jessie.j2
dest: /etc/systemd/system/varnish.service.d/evolinux.conf dest: /etc/systemd/system/varnish.service.d/evolinux.conf
force: yes force: yes
when: ansible_distribution_major_version is version('10', '<')
notify:
- reload systemd
- restart varnish
tags:
- varnish
- name: Override Varnish systemd unit (Buster and later)
template:
src: varnish.conf.buster.j2
dest: /etc/systemd/system/varnish.service.d/evolinux.conf
force: yes
when: ansible_distribution_major_version is version('10', '>=')
notify: notify:
- reload systemd - reload systemd
- restart varnish - restart varnish

View File

@ -0,0 +1,5 @@
# {{ ansible_managed }}
[Service]
ExecStart=
ExecStart=/usr/sbin/varnishd -j unix,user=vcache -F {{ varnish_addresses | map('regex_replace', '^(.*)$', '-a \\1') | list | join(' ') }} -T {{ varnish_management_address }} -f {{ varnish_config_file }} -S {{ varnish_secret_file }} -s {{ varnish_storage }} -p thread_pools={{ varnish_thread_pools }} -p thread_pool_add_delay={{ varnish_thread_pool_add_delay }} -p thread_pool_min={{ varnish_thread_pool_min }} -p thread_pool_max={{ varnish_thread_pool_max }}

View File

@ -1,7 +0,0 @@
# {{ ansible_managed }}
[Service]
ExecStart=
ExecStart=/usr/sbin/varnishd -F {{ varnish_addresses | map('regex_replace', '^(.*)$', '-a \\1') | list | join(' ') }} -T {{ varnish_management_address }} -f {{ varnish_config_file }} -S {{ varnish_secret_file }} -s {{ varnish_storage }} -p thread_pools={{ varnish_thread_pools }} -p thread_pool_add_delay={{ varnish_thread_pool_add_delay }} -p thread_pool_min={{ varnish_thread_pool_min }} -p thread_pool_max={{ varnish_thread_pool_max }}
ExecReload=
ExecReload=/etc/varnish/reload-vcl.sh

View File

@ -0,0 +1,7 @@
# {{ ansible_managed }}
[Service]
ExecStart=
ExecStart=/usr/sbin/varnishd -j unix,user=vcache -F {{ varnish_addresses | map('regex_replace', '^(.*)$', '-a \\1') | list | join(' ') }} -T {{ varnish_management_address }} -f {{ varnish_config_file }} -S {{ varnish_secret_file }} -s {{ varnish_storage }} -p thread_pools={{ varnish_thread_pools }} -p thread_pool_add_delay={{ varnish_thread_pool_add_delay }} -p thread_pool_min={{ varnish_thread_pool_min }} -p thread_pool_max={{ varnish_thread_pool_max }}
ExecReload=
ExecReload=/etc/varnish/reload-vcl.sh