2015-05-28 11:32:57 +02:00
|
|
|
---
|
2015-06-19 18:45:02 +02:00
|
|
|
- name: install fail2ban on ubuntu >= 14.04 and debian >= 8
|
2015-05-28 11:32:57 +02:00
|
|
|
apt: pkg={{ item }} state=installed
|
2015-06-19 18:45:02 +02:00
|
|
|
with_items: f2b_packages
|
|
|
|
tags: fail2ban
|
2015-05-28 11:32:57 +02:00
|
|
|
|
|
|
|
- name: Install the fail2ban custom jail file
|
|
|
|
template: src=jail.local.j2 dest=/etc/fail2ban/jail.local owner=root group=root mode=444
|
|
|
|
notify: Restart fail2ban
|
2015-06-19 18:45:02 +02:00
|
|
|
tags: fail2ban
|
2015-05-28 11:32:57 +02:00
|
|
|
|
2015-06-19 18:45:02 +02:00
|
|
|
- name: Ensure that fail2ban is enabled and running
|
|
|
|
service: name=fail2ban state=started enabled=yes
|