0
0
vps-set-up-playbook/roles/fail2ban/tasks/main.yaml

20 lines
379 B
YAML

- name: Install fail2ban
apt:
name:
- fail2ban
state: latest
install_recommends: false
- name: Copy fail2ban conf
template:
src: "jail.local.j2"
dest: "/etc/fail2ban/jail.local"
owner: root
group: root
mode: 0644
- name: Ensure fail2ban is running and enabled on boot.
service:
name: fail2ban
state: started
enabled: true