more stuff

This commit is contained in:
counterweight 2025-08-21 22:45:47 +02:00
parent 0db4cf94b5
commit 874ec197fe
Signed by: counterweight
GPG key ID: 883EDBAA726BD96C
3 changed files with 87 additions and 36 deletions

View file

@ -128,41 +128,6 @@
enabled: yes
state: started
- name: Create Fail2Ban filter for LNBits
copy:
dest: /etc/fail2ban/filter.d/lnbits.local
owner: root
group: root
mode: '0644'
content: |
[INCLUDES]
before = common.conf
[Definition]
failregex = ^.*?Invalid credentials.*?IP: <ADDR>.*$
ignoreregex =
- name: Create Fail2Ban jail for LNBits
copy:
dest: /etc/fail2ban/jail.d/lnbits.local
owner: root
group: root
mode: '0644'
content: |
[lnbits]
enabled = true
port = http,https
filter = lnbits
logpath = /var/log/lnbits/lnbits.log
maxretry = 10
findtime = 10m
bantime = 1h
- name: Restart fail2ban to apply changes
systemd:
name: fail2ban
state: restarted
- name: Ensure Caddy sites-enabled directory exists
file:
path: "{{ caddy_sites_dir }}"