Browse Source

varnish: custom reload script is now useless

pull/119/head
Jérémy Lecour 3 months ago
committed by Jérémy Lecour
parent
commit
67ce8de85e
5 changed files with 30 additions and 11 deletions
  1. +1
    -0
      CHANGELOG.md
  2. +17
    -4
      varnish/tasks/main.yml
  3. +5
    -0
      varnish/templates/varnish.conf.buster.j2
  4. +0
    -7
      varnish/templates/varnish.conf.j2
  5. +7
    -0
      varnish/templates/varnish.conf.jessie.j2

+ 1
- 0
CHANGELOG.md View File

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


+ 17
- 4
varnish/tasks/main.yml View File

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


+ 5
- 0
varnish/templates/varnish.conf.buster.j2 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 }}

+ 0
- 7
varnish/templates/varnish.conf.j2 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

+ 7
- 0
varnish/templates/varnish.conf.jessie.j2 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

Loading…
Cancel
Save