clamav: ansible-lint fixes
This commit is contained in:
parent
0b7fb73261
commit
986542b877
2 changed files with 18 additions and 16 deletions
|
@ -1,9 +1,12 @@
|
|||
---
|
||||
|
||||
- name: restart clamd
|
||||
service:
|
||||
- name: Restart clamd
|
||||
ansible.builtin.service:
|
||||
name: clamd@scan
|
||||
state: restarted
|
||||
|
||||
- name: refresh clamd socket directory
|
||||
command: systemd-tmpfiles --create /etc/tmpfiles.d/clamd.scan.conf
|
||||
- name: Refresh clamd socket directory
|
||||
ansible.builtin.command:
|
||||
argv:
|
||||
- systemd-tmpfiles
|
||||
- --create
|
||||
- /etc/tmpfiles.d/clamd.scan.conf
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
---
|
||||
|
||||
- name: install packages
|
||||
package:
|
||||
- name: Install packages
|
||||
ansible.builtin.package:
|
||||
name: "{{ item }}"
|
||||
state: installed
|
||||
with_items:
|
||||
|
@ -9,8 +8,8 @@
|
|||
- clamav-update
|
||||
- clamd
|
||||
|
||||
- name: fix socket directory permissions
|
||||
copy:
|
||||
- name: Fix socket directory permissions
|
||||
ansible.builtin.copy:
|
||||
dest: /etc/tmpfiles.d/clamd.scan.conf
|
||||
content: "d /run/clamd.scan 711 clamscan clamscan"
|
||||
mode: 0644
|
||||
|
@ -18,22 +17,22 @@
|
|||
group: "{{ ansible_wheel }}"
|
||||
notify: refresh clamd socket directory
|
||||
|
||||
- name: enable clamd local socket
|
||||
lineinfile:
|
||||
- name: Enable clamd local socket
|
||||
ansible.builtin.lineinfile:
|
||||
path: /etc/clamd.d/scan.conf
|
||||
regexp: "^#?LocalSocket .*"
|
||||
line: "LocalSocket /run/clamd.scan/clamd.sock"
|
||||
notify: restart clamd
|
||||
|
||||
- name: allow everyone to connect local socket
|
||||
lineinfile:
|
||||
- name: Allow everyone to connect local socket
|
||||
ansible.builtin.lineinfile:
|
||||
path: /etc/clamd.d/scan.conf
|
||||
regexp: "^#?LocalSocketMode .*"
|
||||
line: "LocalSocketMode 666"
|
||||
notify: restart clamd
|
||||
|
||||
- name: enable services
|
||||
service:
|
||||
- name: Enable services
|
||||
ansible.builtin.service:
|
||||
name: "{{ item }}"
|
||||
enabled: true
|
||||
state: started
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue