ansible/roles/fail2ban/tasks/main.yml.bkp
2025-02-21 12:19:22 +03:00

24 lines
458 B
Plaintext

---
# tasks file for fail2ban
- name: Install Fail2Ban package
ansible.builtin.package:
name: fail2ban
state: present
- name: Deploy jail.local configuration
ansible.builtin.template:
src: jail.local.j2
dest: /etc/fail2ban/jail.local
owner: root
group: root
mode: '0644'
notify: Restart fail2ban
- name: Enable and start Fail2Ban service
ansible.builtin.service:
name: fail2ban
state: started
enabled: yes