Update for automated response around poorly behaving archlinux-keyring weekly timer; rename Sora role to Password
This commit is contained in:
3
roles/Sharingan/files/monit/checks/automated_response
Normal file
3
roles/Sharingan/files/monit/checks/automated_response
Normal file
@@ -0,0 +1,3 @@
|
||||
check program check_archlinux_wkd with path "/usr/bin/systemctl is-failed archlinux-keyring-wkd-sync.service"
|
||||
if status == 0 for 1 times within 5 cycles then exec "/usr/bin/systemctl reset-failed archlinux-keyring-wkd-sync.service"
|
||||
if status == 0 for 5 times within 5 cycles then exec "/etc/monit.d/scripts/critical CRITICAL: Archlinux Keyring WKD Sync has failed and automated remediation has not solved it."
|
@@ -1 +1,2 @@
|
||||
include "/etc/monit.d/checks/system"
|
||||
include "/etc/monit.d/checks/automated_response"
|
||||
|
@@ -1 +1,2 @@
|
||||
include "/etc/monit.d/checks/system"
|
||||
include "/etc/monit.d/checks/automated_response"
|
||||
|
1
roles/Sharingan/files/monit/hostdefs/Nodelet0
Normal file
1
roles/Sharingan/files/monit/hostdefs/Nodelet0
Normal file
@@ -0,0 +1 @@
|
||||
include "/etc/monit.d/checks/system"
|
1
roles/Sharingan/files/monit/hostdefs/Nodelet1
Normal file
1
roles/Sharingan/files/monit/hostdefs/Nodelet1
Normal file
@@ -0,0 +1 @@
|
||||
include "/etc/monit.d/checks/system"
|
1
roles/Sharingan/files/monit/hostdefs/Nodelet2
Normal file
1
roles/Sharingan/files/monit/hostdefs/Nodelet2
Normal file
@@ -0,0 +1 @@
|
||||
include "/etc/monit.d/checks/system"
|
1
roles/Sharingan/files/monit/hostdefs/Nodelet3
Normal file
1
roles/Sharingan/files/monit/hostdefs/Nodelet3
Normal file
@@ -0,0 +1 @@
|
||||
include "/etc/monit.d/checks/system"
|
1
roles/Sharingan/files/monit/hostdefs/Nodelet4
Normal file
1
roles/Sharingan/files/monit/hostdefs/Nodelet4
Normal file
@@ -0,0 +1 @@
|
||||
include "/etc/monit.d/checks/system"
|
@@ -1,3 +1,4 @@
|
||||
include "/etc/monit.d/checks/system"
|
||||
include "/etc/monit.d/checks/vips"
|
||||
include "/etc/monit.d/checks/availability"
|
||||
include "/etc/monit.d/checks/automated_response"
|
||||
|
@@ -2,3 +2,4 @@ include "/etc/monit.d/checks/system"
|
||||
include "/etc/monit.d/checks/watcher-of-watchers"
|
||||
include "/etc/monit.d/checks/warrant-canary"
|
||||
include "/etc/monit.d/checks/grimoire"
|
||||
include "/etc/monit.d/checks/automated_response"
|
||||
|
@@ -33,33 +33,17 @@
|
||||
- sharingan-scan.service
|
||||
- sharingan-scan.timer
|
||||
|
||||
- name: Scanning services
|
||||
become: yes
|
||||
register: clam_svc
|
||||
copy:
|
||||
src: "clamav/{{ item }}"
|
||||
dest: /usr/lib/systemd/system/
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0664
|
||||
loop:
|
||||
- freshclam.service
|
||||
- freshclam.timer
|
||||
- clamscan.service
|
||||
- clamscan.timer
|
||||
|
||||
- systemd:
|
||||
daemon_reload: yes
|
||||
become: yes
|
||||
when: clam_svc.changed or lynis_svc.changed
|
||||
|
||||
when: lynis_svc.changed
|
||||
|
||||
- name: Enable timers
|
||||
become: yes
|
||||
loop:
|
||||
- freshclam.timer
|
||||
- sharingan-scan.timer
|
||||
service:
|
||||
name: "{{ item }}"
|
||||
name: sharingan-scan.timer
|
||||
state: restarted
|
||||
enabled: yes
|
||||
|
||||
- import_tasks: "./vscan.yml"
|
||||
when: vscan_enabled is defined
|
||||
|
@@ -5,7 +5,8 @@
|
||||
package:
|
||||
name:
|
||||
- elasticsearch
|
||||
- mongodb44-bin # Temporarily pinned for extensions
|
||||
- mongodb-bin
|
||||
- mongodb-tools-bin
|
||||
- graylog
|
||||
state: present
|
||||
|
||||
|
26
roles/Sharingan/tasks/vscan.yml
Normal file
26
roles/Sharingan/tasks/vscan.yml
Normal file
@@ -0,0 +1,26 @@
|
||||
---
|
||||
|
||||
- name: Virus scanning services
|
||||
become: yes
|
||||
register: clam_svc
|
||||
copy:
|
||||
src: "clamav/{{ item }}"
|
||||
dest: /usr/lib/systemd/system/
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0664
|
||||
loop:
|
||||
- freshclam.service
|
||||
- freshclam.timer
|
||||
- clamscan.service
|
||||
- clamscan.timer
|
||||
|
||||
- name: Enable timers
|
||||
become: yes
|
||||
loop:
|
||||
- freshclam.timer
|
||||
- clamscan.timer
|
||||
service:
|
||||
name: "{{ item }}"
|
||||
state: restarted
|
||||
enabled: yes
|
Reference in New Issue
Block a user