Add systemd support

This commit is contained in:
Julian Rother 2025-01-15 20:36:08 +01:00
parent 1f22db68e1
commit 82ee70aa58
Signed by: julian
GPG key ID: C19B924C0CD13341
2 changed files with 6 additions and 2 deletions

View file

@ -1,8 +1,10 @@
fail2ban_config: fail2ban_config:
DEFAULT: DEFAULT:
logtarget: SYSLOG logtarget: SYSTEMD-JOURNAL
allowipv6: auto
fail2ban_jail: fail2ban_jail:
DEFAULT: DEFAULT:
backend: systemd
banaction: nftables-multiport banaction: nftables-multiport
banaction_allports: nftables-allports banaction_allports: nftables-allports

View file

@ -1,6 +1,8 @@
- name: Install fail2ban - name: Install fail2ban
ansible.builtin.apt: ansible.builtin.apt:
pkg: fail2ban pkg:
- fail2ban
- python3-systemd
- name: Copy fail2ban config - name: Copy fail2ban config
ansible.builtin.template: ansible.builtin.template: