Refresh Bitwarden's Fail2ban jail on a timer

This commit is contained in:
2026-09-13 20:15:16 -04:00
parent e009974f80
commit 6763c2bc29
5 changed files with 54 additions and 0 deletions
+25
View File
@@ -279,3 +279,28 @@
dest: /etc/fail2ban/jail.d/bitwarden.conf
mode: "640"
notify: restart_fail2ban
- name: Install Bitwarden's Fail2ban reload service
ansible.builtin.template:
src: fail2ban-reload.service.j2
dest: "/etc/systemd/system/fail2ban-reload-{{ bitwarden_name }}.service"
owner: root
group: root
mode: "0644"
notify: reload_bitwarden_jail
- name: Install Bitwarden's Fail2ban reload timer
ansible.builtin.template:
src: fail2ban-reload.timer.j2
dest: "/etc/systemd/system/fail2ban-reload-{{ bitwarden_name }}.timer"
owner: root
group: root
mode: "0644"
notify: reload_bitwarden_jail
- name: Enable Bitwarden's Fail2ban reload timer
ansible.builtin.systemd_service:
name: "fail2ban-reload-{{ bitwarden_name }}.timer"
enabled: true
state: started
daemon_reload: true