aboutsummaryrefslogtreecommitdiff
path: root/old/attackbox/handlers
diff options
context:
space:
mode:
authorheqnx <root@heqnx.com>2025-05-25 11:50:46 +0300
committerheqnx <root@heqnx.com>2025-05-25 11:50:46 +0300
commit7c8ed923df3c02338dfbf826fd6fd9a23dac502e (patch)
tree929ee32e5a6f32e952bb8fcad33f704a371af9ff /old/attackbox/handlers
parente905a6a60ceb43ef2bfa8f0f61c23630955caf1f (diff)
downloadansible-playbooks-7c8ed923df3c02338dfbf826fd6fd9a23dac502e.tar.gz
ansible-playbooks-7c8ed923df3c02338dfbf826fd6fd9a23dac502e.zip
moved unorganized playbooks into old folder
Diffstat (limited to 'old/attackbox/handlers')
-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'