diff --git a/CHANGELOG.md b/CHANGELOG.md index 09213e22..b75809f9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -37,6 +37,7 @@ The **patch** part changes incrementally at each release. * ntpd: Add leapfile configuration setting to ntpd on debian 10+ * packweb-apache: install phpMyAdmin from buster-backports * spamassassin: change dependency on evomaintenance +* squid: must be started in foreground mode for systemd * squid: remove obsolete variable on Squid 4 ### Fixed diff --git a/squid/files/systemd-override.conf b/squid/files/systemd-override.conf deleted file mode 100644 index eab76a17..00000000 --- a/squid/files/systemd-override.conf +++ /dev/null @@ -1,4 +0,0 @@ -# systemd override for Squid -[Service] -ExecStart= -ExecStart=/usr/sbin/squid -sYC -f /etc/squid/evolinux-defaults.conf diff --git a/squid/tasks/systemd.yml b/squid/tasks/systemd.yml index 82b8760c..ac9eb7e9 100644 --- a/squid/tasks/systemd.yml +++ b/squid/tasks/systemd.yml @@ -16,8 +16,8 @@ mode: "0755" - name: "Squid systemd unit service is present" - copy: - src: systemd-override.conf + template: + src: systemd-override.conf.j2 dest: /etc/systemd/system/squid.service.d/override.conf force: yes register: _squid_systemd_override diff --git a/squid/templates/systemd-override.conf.j2 b/squid/templates/systemd-override.conf.j2 new file mode 100644 index 00000000..ee3ff666 --- /dev/null +++ b/squid/templates/systemd-override.conf.j2 @@ -0,0 +1,8 @@ +# systemd override for Squid +[Service] +ExecStart= +{% if ansible_distribution_major_version is version('11', '>=') %} +ExecStart=/usr/sbin/squid --foreground -sYC -f /etc/squid/evolinux-defaults.conf +{% else %} +ExecStart=/usr/sbin/squid -sYC -f /etc/squid/evolinux-defaults.conf +{% endif %}