extensions-website/playbooks/install.yaml

48 lines
1.3 KiB
YAML

---
- import_playbook: shared/install.yaml
- hosts: application
gather_facts: true
become: true
vars:
playbook_type: install
handlers:
- name: Enable and restart ClamAV daemon
ansible.builtin.systemd:
name: clamav-daemon.service
state: restarted
enabled: true
tags:
- clamav
- name: Enable fangfrisch timer
ansible.builtin.systemd:
name: fangfrisch.timer
state: restarted
enabled: true
tags:
- clamav
tasks:
- name: Configuring ClamAV
ansible.builtin.lineinfile:
path: /etc/clamav/clamd.conf
regexp: "{{ item.regexp }}"
line: "{{ item.line }}"
state: present
backup: true
with_items:
- regexp: ^#*\s*MaxScanSize\s
line: "MaxScanSize {{ client_max_body_size|upper }}"
- regexp: ^#*\s*MaxFileSize\s
line: "MaxFileSize {{ client_max_body_size|upper }}"
- regexp: ^#*\s*PCREMaxFileSize\s
line: "PCREMaxFileSize {{ client_max_body_size|upper }}"
- regexp: ^#*\s*StreamMaxLength\s
line: "StreamMaxLength {{ client_max_body_size|upper }}"
notify:
- Enable and restart ClamAV daemon
- Enable fangfrisch timer
tags:
- clamav