22 lines
441 B
YAML
Raw Normal View History

2022-05-26 01:24:56 +02:00
---
2022-06-11 02:32:23 +02:00
- name: Ensures fail2ban dir exists
file:
path: /etc/fail2ban
state: directory
2022-05-26 01:24:56 +02:00
- name: Configure fail2ban
copy:
src: ../templates/fail2ban.conf
dest: /etc/fail2ban/fail2ban.conf
backup: yes
2022-06-11 02:32:23 +02:00
- name: Update package cache (apt/Debian)
ansible.builtin.apt:
update_cache: yes
when: ansible_distribution == "Debian"
2022-06-11 02:32:23 +02:00
- name: Install fail2ban
ansible.builtin.package:
name: fail2ban
state: present