vn-ansible/roles/debian-base/tasks/fail2ban.yml

20 lines
455 B
YAML
Raw Normal View History

- name: Install fail2ban and rsyslog packages
2024-09-23 12:30:38 +00:00
apt:
name: "{{ fail2ban_base_packages }}"
2024-09-23 12:30:38 +00:00
state: present
- name: Configure fail2ban service
2024-09-23 12:30:38 +00:00
template:
src: jail.local
2024-09-23 12:30:38 +00:00
dest: /etc/fail2ban/jail.local
owner: root
group: root
mode: u=rw,g=r,o=r
notify: restart fail2ban
- name: Ensure file for auth sshd custom log exists
file:
path: /var/log/auth.log
state: touch
owner: root
group: adm
mode: u=rw,g=r,o=