-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move virus scan systemd setup to its own tasks file
This allows these tasks to be run even when clamav_install_from_package_manager is false. We used to install the corresponding cron job even in this case, so it makes sense to do it for the systemd foo as well.
- Loading branch information
Showing
3 changed files
with
33 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
--- | ||
- name: Install virus scan shell script to be run by systemd service | ||
ansible.builtin.template: | ||
dest: /usr/local/sbin/virus_scan.sh | ||
mode: 0500 | ||
src: virus_scan.sh.j2 | ||
|
||
- name: Copy systemd service to run virus scan | ||
ansible.builtin.copy: | ||
dest: /etc/systemd/system/run-virus-scan.service | ||
mode: 0500 | ||
src: run-virus-scan.service | ||
# I'd like to validate the file here, but that can't be done | ||
# cleanly. See ansible/ansible#19243. | ||
# validate: systemd-analyze verify %s | ||
|
||
- name: Copy systemd timer to run virus scan | ||
ansible.builtin.template: | ||
dest: /etc/systemd/system/run-virus-scan.timer | ||
mode: 0500 | ||
src: run-virus-scan.timer.j2 | ||
# I'd like to validate the file here, but that can't be done | ||
# cleanly. See ansible/ansible#19243. | ||
# validate: systemd-analyze verify %s | ||
|
||
- name: Enable the systemd timer | ||
ansible.builtin.systemd_service: | ||
enabled: true | ||
name: run-virus-scan.timer |