squid: compatibility wit Debian 10
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
a9b61161e0
commit
27adad616f
|
@ -44,7 +44,7 @@ The **patch** part changes incrementally at each release.
|
||||||
* php: Don't set a chroot for the default fpm pool
|
* php: Don't set a chroot for the default fpm pool
|
||||||
* rbenv: install Ruby 2.6.5 by default
|
* rbenv: install Ruby 2.6.5 by default
|
||||||
* squid: Remove wait time when we turn off squid
|
* squid: Remove wait time when we turn off squid
|
||||||
* squid: split systemd tasks into own file
|
* squid: compatibility wit Debian 10
|
||||||
* varnish: remove custom ExecReload= script for Debian 10+
|
* varnish: remove custom ExecReload= script for Debian 10+
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
|
@ -1,22 +0,0 @@
|
||||||
## Copyright (C) 1996-2019 The Squid Software Foundation and contributors
|
|
||||||
##
|
|
||||||
## Squid software is distributed under GPLv2+ license and includes
|
|
||||||
## contributions from numerous individuals and organizations.
|
|
||||||
## Please see the COPYING and CONTRIBUTORS files for details.
|
|
||||||
##
|
|
||||||
|
|
||||||
[Unit]
|
|
||||||
Description=Squid Web Proxy Server
|
|
||||||
Documentation=man:squid(8)
|
|
||||||
After=network.target network-online.target nss-lookup.target
|
|
||||||
|
|
||||||
[Service]
|
|
||||||
Type=forking
|
|
||||||
PIDFile=/var/run/squid.pid
|
|
||||||
ExecStartPre=/usr/sbin/squid --foreground -z
|
|
||||||
ExecStart=/usr/sbin/squid -sYC -f /etc/squid/evolinux-defaults.conf
|
|
||||||
ExecReload=/bin/kill -HUP $MAINPID
|
|
||||||
KillMode=mixed
|
|
||||||
|
|
||||||
[Install]
|
|
||||||
WantedBy=multi-user.target
|
|
4
squid/files/systemd-override.conf
Normal file
4
squid/files/systemd-override.conf
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
# systemd override for Squid
|
||||||
|
[Service]
|
||||||
|
ExecStart=
|
||||||
|
ExecStart=/usr/sbin/squid -sYC -f /etc/squid/evolinux-defaults.conf
|
|
@ -4,21 +4,28 @@
|
||||||
command: systemctl -q is-active squid.service
|
command: systemctl -q is-active squid.service
|
||||||
changed_when: False
|
changed_when: False
|
||||||
failed_when: False
|
failed_when: False
|
||||||
register: squid_systemd_active
|
register: _squid_systemd_active
|
||||||
|
|
||||||
|
- name: Squid systemd overrides directory exists
|
||||||
|
file:
|
||||||
|
dest: /etc/systemd/system/squid.service.d/
|
||||||
|
state: directory
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
mode: "0755"
|
||||||
|
|
||||||
- name: "Squid systemd unit service is present (Debian 10 or later)"
|
- name: "Squid systemd unit service is present"
|
||||||
copy:
|
copy:
|
||||||
src: squid.service
|
src: systemd-override.conf
|
||||||
dest: /etc/systemd/system/squid.service
|
dest: /etc/systemd/system/squid.service.d/override.conf
|
||||||
when:
|
force: yes
|
||||||
- ansible_distribution_major_version | version_compare('10', '>=')
|
register: _squid_systemd_override
|
||||||
- squid_systemd_active.rc != 0
|
|
||||||
|
|
||||||
- name: "Systemd is reload and Squid restarted (Debian 10 or later)"
|
- name: "Systemd daemon is reloaded and Squid restarted"
|
||||||
systemd:
|
systemd:
|
||||||
name: squid
|
name: squid
|
||||||
state: restarted
|
state: restarted
|
||||||
daemon_reload: yes
|
daemon_reload: yes
|
||||||
when:
|
when:
|
||||||
- ansible_distribution_major_version | version_compare('10', '>=')
|
- _squid_systemd_active.rc == 0
|
||||||
- squid_systemd_active.rc != 0
|
- _squid_systemd_override.changed
|
||||||
|
|
Loading…
Reference in a new issue