From c9ccda227795073e466a077532ae4d3cc72168ab Mon Sep 17 00:00:00 2001 From: Jeremy Lecour Date: Wed, 2 Nov 2022 19:45:15 +0100 Subject: [PATCH] varnish: create special tmp directory for syntax validation --- CHANGELOG.md | 1 + varnish/tasks/main.yml | 11 +++++++++++ 2 files changed, 12 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index dfece0b1..4546d4da 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ The **patch** part changes is incremented if multiple releases happen the same m * evolinux-base: replace regular kernel by cloud kernel on virtual servers * nagios-nrpe: check_haproxy_stats supports DRAIN status * lxc-php: set php-fpm umask to 007 +* varnish: create special tmp directory for syntax validation ### Changed diff --git a/varnish/tasks/main.yml b/varnish/tasks/main.yml index be518130..286d49dd 100644 --- a/varnish/tasks/main.yml +++ b/varnish/tasks/main.yml @@ -151,4 +151,15 @@ - config - update-config +# To validate the configuration, we must use a tmp directory that is mounted as exec +# We usually use /vat/tmp-cache then validate the syntax with this command: +# sudo -u vcache TMPDIR=/var/tmp-vcache varnishd -Cf /etc/varnish/default.vcl > /dev/null +- name: Special tmp directory + file: + path: "{{ varnish_tmp_dir }}" + state: directory + owner: vcache + group: varnish + mode: "0750" + - include: munin.yml