aboutsummaryrefslogtreecommitdiff
path: root/old/attackbox/handlers/main.yaml
diff options
context:
space:
mode:
Diffstat (limited to 'old/attackbox/handlers/main.yaml')
-rw-r--r--old/attackbox/handlers/main.yaml49
1 files changed, 49 insertions, 0 deletions
diff --git a/old/attackbox/handlers/main.yaml b/old/attackbox/handlers/main.yaml
new file mode 100644
index 0000000..d0c15e9
--- /dev/null
+++ b/old/attackbox/handlers/main.yaml
@@ -0,0 +1,49 @@
+- name: update grub
+ command: update-grub
+
+- name: reload fail2ban
+ command: fail2ban-client reload
+
+- name: enable ufw
+ ufw:
+ state: enabled
+ policy: deny
+
+- name: restart ufw
+ systemd:
+ name: ufw
+ state: restarted
+ enabled: true
+ when: ansible_facts['service_mgr'] == 'systemd'
+
+- name: reload systemd
+ command: systemctl daemon-reload
+ when: ansible_facts['service_mgr'] == 'systemd'
+
+- name: restart ssh
+ systemd:
+ name: ssh
+ state: restarted
+ enabled: true
+ when: ansible_facts['service_mgr'] == 'systemd'
+
+- name: enable unattended-upgrades service
+ systemd:
+ name: unattended-upgrades
+ 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: restart tor
+ systemd:
+ name: tor
+ state: restarted
+ enabled: true
+ when: ansible_facts['service_mgr'] == 'systemd'