library/roles/fail2ban: eliminate the dependency from the iptables role. Install the iptables package.

This commit is contained in:
Andrea Dell'Amico 2015-06-19 18:45:02 +02:00
parent 0f8143c8c7
commit 875acb1dd1
2 changed files with 9 additions and 7 deletions

View File

@ -31,3 +31,6 @@ f2b_recidive_findtime: 604800
# 14515200 24 weeks
f2b_recidive_ban_time: 14515200
f2b_packages:
- fail2ban
- iptables

View File

@ -1,14 +1,13 @@
---
- name: install fail2ban ubuntu >= 14.04
- name: install fail2ban on ubuntu >= 14.04 and debian >= 8
apt: pkg={{ item }} state=installed
with_items:
- fail2ban
tags:
- fail2ban
with_items: f2b_packages
tags: fail2ban
- 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
tags:
- fail2ban
tags: fail2ban
- name: Ensure that fail2ban is enabled and running
service: name=fail2ban state=started enabled=yes