Ansible config for hetzner mailserver

This commit is contained in:
Ruben Hensen
2026-03-14 22:24:53 +01:00
parent bc2f75294d
commit 2a3bfb5d1a
30 changed files with 775 additions and 0 deletions
@@ -0,0 +1,25 @@
---
- name: Install fail2ban
ansible.builtin.apt:
name: fail2ban
state: present
- name: Deploy Stalwart auth filter
ansible.builtin.template:
src: stalwart-auth.conf.j2
dest: /etc/fail2ban/filter.d/stalwart-auth.conf
mode: "0644"
notify: restart fail2ban
- name: Deploy jail.local
ansible.builtin.template:
src: jail.local.j2
dest: /etc/fail2ban/jail.local
mode: "0644"
notify: restart fail2ban
- name: Enable and start fail2ban
ansible.builtin.systemd:
name: fail2ban
enabled: true
state: started