Browse Source

Merge "Add check to ClamAV task to prevent simeltaneous content updates"

tags/18.0.0.0b1
Zuul 1 year ago
parent
commit
dc798c7979
1 changed files with 10 additions and 0 deletions
  1. 10
    0
      tasks/rhel7stig/misc.yml

+ 10
- 0
tasks/rhel7stig/misc.yml View File

@@ -182,10 +182,20 @@
182 182
     - misc
183 183
     - V-72213
184 184
 
185
+- name: Check if ClamAV update process is already running
186
+  shell: "ps -ef | egrep [f]reshclam -q"
187
+  register: freshclam_proc
188
+  changed_when: False
189
+  failed_when: False
190
+  check_mode: no
191
+  tags:
192
+    - always
193
+
185 194
 - name: Update ClamAV database
186 195
   command: freshclam
187 196
   changed_when: False
188 197
   when:
198
+    - freshclam_proc.rc != 0
189 199
     - clamav_install_check.stat.exists
190 200
     - security_enable_virus_scanner | bool
191 201
     - security_run_virus_scanner_update | bool

Loading…
Cancel
Save