summaryrefslogtreecommitdiffstats
path: root/roles/common/tasks
diff options
context:
space:
mode:
authorGuilhem Moulin <guilhem@fripost.org>2013-12-15 23:46:29 +0100
committerGuilhem Moulin <guilhem@fripost.org>2015-06-07 02:51:26 +0200
commit7fe517c328906d0f962c3dc33d7bc773f2348bb4 (patch)
treed8e56323c10cd32952d5b473d4ee56d605375c7d /roles/common/tasks
parent540779286a899dee846784a8ffd0fdab756ac1e3 (diff)
Configure the webmail.
Diffstat (limited to 'roles/common/tasks')
-rw-r--r--roles/common/tasks/fail2ban.yml15
1 files changed, 13 insertions, 2 deletions
diff --git a/roles/common/tasks/fail2ban.yml b/roles/common/tasks/fail2ban.yml
index d5007b9..be26c79 100644
--- a/roles/common/tasks/fail2ban.yml
+++ b/roles/common/tasks/fail2ban.yml
@@ -1,17 +1,28 @@
- name: Install fail2ban
apt: pkg=fail2ban
+- name: Add addititional filters
+ copy: src=etc/fail2ban/filter.d/{{ item }}
+ dest=/etc/fail2ban/filter.d/{{ item }}
+ owner=root group=root
+ mode=0644
+ register: r1
+ with_items:
+ - roundcube.conf
+ notify:
+ - Restart fail2ban
+
- name: Configure fail2ban
template: src=etc/fail2ban/jail.local.j2
dest=/etc/fail2ban/jail.local
owner=root group=root
mode=0644
- register: r
+ register: r2
notify:
- Restart fail2ban
- name: Start fail2ban
service: name=fail2ban state=started
- when: not r.changed
+ when: not (r1.changed or r2.changed)
- meta: flush_handlers