mirror of
https://github.com/rubenhensen/k8scd.git
synced 2026-09-17 18:22:54 +02:00
26 lines
557 B
YAML
26 lines
557 B
YAML
---
|
|
- 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
|