squid: split systemd tasks into own file

This commit is contained in:
Jérémy Lecour 2019-09-22 22:18:09 +02:00
parent 755eaab60a
commit 2d249f1815
3 changed files with 16 additions and 11 deletions

View file

@ -14,6 +14,7 @@ The **patch** part changes incrementally at each release.
### Changed
* elasticsearch: listen on local interface only by default
* squid: split systemd tasks into own file
### Fixed
* lxc-php: Don't remove the default pool

View file

@ -29,12 +29,6 @@
dest: /etc/default/squid
when: ansible_distribution_major_version | version_compare('9', '>=')
- name: "Set custom systemd unit service (Debian 10 or later)"
copy:
src: squid.service
dest: /etc/systemd/system/squid.service
when: ansible_distribution_major_version | version_compare('10', '>=')
- name: "squid.conf is present (jessie)"
template:
src: squid.conf.j2
@ -140,11 +134,7 @@
notify: "reload squid"
when: ansible_distribution_major_version | version_compare('9', '>=')
- name: "Reload systemd and restart squid (Debian 10 or later)"
systemd:
name: squid
state: restarted
daemon_reload: yes
- include: systemd.yml
when: ansible_distribution_major_version | version_compare('10', '>=')
- include: logrotate_jessie.yml

14
squid/tasks/systemd.yml Normal file
View file

@ -0,0 +1,14 @@
---
- name: "Set custom systemd unit service (Debian 10 or later)"
copy:
src: squid.service
dest: /etc/systemd/system/squid.service
when: ansible_distribution_major_version | version_compare('10', '>=')
- name: "Reload systemd and restart squid (Debian 10 or later)"
systemd:
name: squid
state: restarted
daemon_reload: yes
when: ansible_distribution_major_version | version_compare('10', '>=')