self-hosting/roles/forgejo/tasks/fail2ban.yml

20 lines
474 B
YAML

---
- name: Copy fail2ban filter
become: true
ansible.builtin.copy:
src: fail2ban/forgejo-filter.conf
dest: /etc/fail2ban/filter.d/forgejo.conf
owner: root
group: root
mode: 0644
notify: Restart fail2ban service
- name: Copy fail2ban jail
become: true
ansible.builtin.template:
src: fail2ban/forgejo-jail.conf.j2
dest: /etc/fail2ban/jail.d/forgejo.conf
owner: root
group: root
mode: 0644
notify: Restart fail2ban service