From 2ccb5034924a75aac483f1060ae5d0d1a0293569 Mon Sep 17 00:00:00 2001 From: heqnx Date: Sat, 24 May 2025 16:06:06 +0300 Subject: added fail2ban, sshd verbose logging, more handlers --- attackbox/handlers/main.yaml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 attackbox/handlers/main.yaml (limited to 'attackbox/handlers') diff --git a/attackbox/handlers/main.yaml b/attackbox/handlers/main.yaml new file mode 100644 index 0000000..1e18521 --- /dev/null +++ b/attackbox/handlers/main.yaml @@ -0,0 +1,26 @@ +- name: update grub + command: update-grub + +- name: restart ssh + systemd: + name: ssh + state: restarted + enabled: true + when: ansible_facts['service_mgr'] == 'systemd' + +- name: restart fail2ban + systemd: + name: fail2ban + state: restarted + enabled: true + when: ansible_facts['service_mgr'] == 'systemd' + +- name: reload fail2ban + command: fail2ban-client reload + +- name: restart tor + systemd: + name: tor + state: restarted + enabled: true + when: ansible_facts['service_mgr'] == 'systemd' -- cgit v1.2.3