clamav: Initial version of role
This commit is contained in:
parent
9fb67e5a8f
commit
8cea9f7e5f
3 changed files with 45 additions and 0 deletions
6
roles/clamav/handlers/main.yml
Normal file
6
roles/clamav/handlers/main.yml
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
---
|
||||||
|
|
||||||
|
- name: restart clamd
|
||||||
|
service:
|
||||||
|
name: clamd@scan
|
||||||
|
state: restarted
|
4
roles/clamav/meta/main.yml
Normal file
4
roles/clamav/meta/main.yml
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
---
|
||||||
|
|
||||||
|
dependencies:
|
||||||
|
- {role: epel-repo}
|
35
roles/clamav/tasks/main.yml
Normal file
35
roles/clamav/tasks/main.yml
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
---
|
||||||
|
|
||||||
|
- name: install packages
|
||||||
|
package:
|
||||||
|
name: "{{ item }}"
|
||||||
|
state: installed
|
||||||
|
with_items:
|
||||||
|
- clamav
|
||||||
|
- clamav-update
|
||||||
|
- clamd
|
||||||
|
|
||||||
|
- name: enable clamd local socket
|
||||||
|
lineinfile:
|
||||||
|
path: /etc/clamd.d/scan.conf
|
||||||
|
regexp: "^#LocalSocket .*"
|
||||||
|
line: "LocalSocket /run/clamd.scan/clamd.sock"
|
||||||
|
notify: restart clamd
|
||||||
|
|
||||||
|
- name: link clamd service
|
||||||
|
file:
|
||||||
|
dest: /etc/systemd/system/clamd@scan.service
|
||||||
|
src: /lib/systemd/system/clamd@.service
|
||||||
|
state: link
|
||||||
|
owner: root
|
||||||
|
group: "{{ ansible_wheel }}"
|
||||||
|
follow: false
|
||||||
|
|
||||||
|
- name: enable services
|
||||||
|
service:
|
||||||
|
name: "{{ item }}"
|
||||||
|
enabled: true
|
||||||
|
state: started
|
||||||
|
with_items:
|
||||||
|
- clamav-freshclam
|
||||||
|
- clamd@scan
|
Loading…
Add table
Add a link
Reference in a new issue