Update to 2023-09-13 23:00

This commit is contained in:
Daniel Berteaud
2023-09-13 23:00:21 +02:00
parent 758b7f1094
commit 3475fdc9bf
12 changed files with 9 additions and 119 deletions

View File

@@ -4,8 +4,6 @@
yum:
name:
- squid
- c-icap
- squidclamav
- ufdbGuard
notify: restart squid
tags: proxy
@@ -138,43 +136,12 @@
register: squid_safebrowsing
tags: proxy
- name: Deploy clamd config
template: src=clamd.conf.j2 dest=/etc/clamd.d/squid.conf
notify: restart squid-clamd
tags: proxy
- name: Deploy clamd systemd unit
template: src=squid-clamd.service.j2 dest=/etc/systemd/system/squid-clamd.service
register: squid_clam_unit
notify: restart squid-clamd
tags: proxy
- name: Deploy c-icap configuration
template: src=c-icap.conf.j2 dest=/etc/c-icap/c-icap.conf
notify: restart c-icap
tags: proxy
- name: Create systemd unit snippet dir
file: path=/etc/systemd/system/{{ item }}.service.d state=directory
loop:
- c-icap
- squid
tags: proxy
- name: Deploy a systemd unit snippet for c-icap
copy:
content: |
[Service]
User=c-icap
Group=c-icap
Restart=on-failure
StartLimitInterval=0
RestartSec=1
dest: /etc/systemd/system/c-icap.service.d/user.conf
register: squid_c_icap_unit
notify: restart c-icap
tags: proxy
- name: Deploy a systemd unit snipet for squid
copy:
content: |
@@ -186,14 +153,9 @@
register: squid_unit
tags: proxy
- name: Deploy squidclamav configuration
template: src=squidclamav.conf.j2 dest=/etc/c-icap/squidclamav.conf mode=644
notify: restart c-icap
tags: proxy
- name: Reload systemd
command: systemctl daemon-reload
when: squid_clam_unit.changed or squid_c_icap_unit.changed or squid_unit.changed
when: squid_unit.changed
tags: proxy
- include_tasks: selinux.yml
@@ -252,14 +214,6 @@
service: name=squid state=started enabled=True
tags: proxy
- name: Start and enable c-icap
service: name=c-icap state=started enabled=True
tags: proxy
- name: Handle squid-clamd daemon
service: name=squid-clamd state={{ squid_scan_av | ternary('started','stopped') }} enabled={{ squid_scan_av | ternary(True,False) }}
tags: proxy
- name: Handle ufdb daemon
service: name={{ squid_ufdb_unit.stat.exists | ternary('ufdbGuard','ufdb') }} state={{ squid_filter_url | ternary('started','stopped') }} enabled={{ squid_filter_url | ternary(True,False) }}
tags: proxy