Files
ansible-domo/roles/fail2ban/tasks/main.yml
2026-04-22 12:22:58 +02:00

22 lines
449 B
YAML

---
- name: Install fail2ban package
ansible.builtin.apt:
name: fail2ban
state: present
update_cache: true
- name: Configure fail2ban jail.local
ansible.builtin.template:
src: jail.local.j2
dest: /etc/fail2ban/jail.local
owner: root
group: root
mode: "0644"
notify: Restart fail2ban
- name: Ensure fail2ban service is enabled
ansible.builtin.service:
name: fail2ban
state: started
enabled: true