From da3838e3e923b82c2a5328e88c1d2d42a6ef350a Mon Sep 17 00:00:00 2001 From: Jeremy Lecour Date: Wed, 15 Nov 2017 11:46:53 +0100 Subject: [PATCH] fail2ban: create config hierarchy beforehand --- fail2ban/tasks/main.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/fail2ban/tasks/main.yml b/fail2ban/tasks/main.yml index 6a9a6ff7..579e143d 100644 --- a/fail2ban/tasks/main.yml +++ b/fail2ban/tasks/main.yml @@ -2,13 +2,16 @@ # We have to copy the local jail before installing the package # or we risk being jailed by fail2ban -- name: Prepare /etc/fail2ban +- name: Prepare fail2ban hierarchy file: - path: /etc/fail2ban + path: "{{ item }}" state: directory owner: root group: root mode: "0755" + with_items: + - "/etc/fail2ban" + - "/etc/fail2ban/filter.d" tags: - fail2ban @@ -44,4 +47,3 @@ tags: - fail2ban - packages -