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
|
||||||
- name: restart clamd
|
ansible.builtin.service:
|
||||||
service:
|
|
||||||
name: clamd@scan
|
name: clamd@scan
|
||||||
state: restarted
|
state: restarted
|
||||||
|
|
||||||
- name: refresh clamd socket directory
|
- name: Refresh clamd socket directory
|
||||||
command: systemd-tmpfiles --create /etc/tmpfiles.d/clamd.scan.conf
|
ansible.builtin.command:
|
||||||
|
argv:
|
||||||
|
- systemd-tmpfiles
|
||||||
|
- --create
|
||||||
|
- /etc/tmpfiles.d/clamd.scan.conf
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
---
|
---
|
||||||
|
- name: Install packages
|
||||||
- name: install packages
|
ansible.builtin.package:
|
||||||
package:
|
|
||||||
name: "{{ item }}"
|
name: "{{ item }}"
|
||||||
state: installed
|
state: installed
|
||||||
with_items:
|
with_items:
|
||||||
|
@ -9,8 +8,8 @@
|
||||||
- clamav-update
|
- clamav-update
|
||||||
- clamd
|
- clamd
|
||||||
|
|
||||||
- name: fix socket directory permissions
|
- name: Fix socket directory permissions
|
||||||
copy:
|
ansible.builtin.copy:
|
||||||
dest: /etc/tmpfiles.d/clamd.scan.conf
|
dest: /etc/tmpfiles.d/clamd.scan.conf
|
||||||
content: "d /run/clamd.scan 711 clamscan clamscan"
|
content: "d /run/clamd.scan 711 clamscan clamscan"
|
||||||
mode: 0644
|
mode: 0644
|
||||||
|
@ -18,22 +17,22 @@
|
||||||
group: "{{ ansible_wheel }}"
|
group: "{{ ansible_wheel }}"
|
||||||
notify: refresh clamd socket directory
|
notify: refresh clamd socket directory
|
||||||
|
|
||||||
- name: enable clamd local socket
|
- name: Enable clamd local socket
|
||||||
lineinfile:
|
ansible.builtin.lineinfile:
|
||||||
path: /etc/clamd.d/scan.conf
|
path: /etc/clamd.d/scan.conf
|
||||||
regexp: "^#?LocalSocket .*"
|
regexp: "^#?LocalSocket .*"
|
||||||
line: "LocalSocket /run/clamd.scan/clamd.sock"
|
line: "LocalSocket /run/clamd.scan/clamd.sock"
|
||||||
notify: restart clamd
|
notify: restart clamd
|
||||||
|
|
||||||
- name: allow everyone to connect local socket
|
- name: Allow everyone to connect local socket
|
||||||
lineinfile:
|
ansible.builtin.lineinfile:
|
||||||
path: /etc/clamd.d/scan.conf
|
path: /etc/clamd.d/scan.conf
|
||||||
regexp: "^#?LocalSocketMode .*"
|
regexp: "^#?LocalSocketMode .*"
|
||||||
line: "LocalSocketMode 666"
|
line: "LocalSocketMode 666"
|
||||||
notify: restart clamd
|
notify: restart clamd
|
||||||
|
|
||||||
- name: enable services
|
- name: Enable services
|
||||||
service:
|
ansible.builtin.service:
|
||||||
name: "{{ item }}"
|
name: "{{ item }}"
|
||||||
enabled: true
|
enabled: true
|
||||||
state: started
|
state: started
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue