From 440bec2febc6fb779b04c64d96082723a4bde8b8 Mon Sep 17 00:00:00 2001 From: Mathieu Trossevin Date: Fri, 19 Jun 2020 10:33:25 +0200 Subject: [PATCH] [Cleanup] fail2ban Name all tasks. It would seems that the task creating the `fail2ban_ignore_ips` fact for the whitelist exist in both main.yml and ip_whitelist.yml, one of them might be superfluous. --- fail2ban/tasks/ip_whitelist.yml | 5 +++-- fail2ban/tasks/main.yml | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/fail2ban/tasks/ip_whitelist.yml b/fail2ban/tasks/ip_whitelist.yml index f899e618..089b70b1 100644 --- a/fail2ban/tasks/ip_whitelist.yml +++ b/fail2ban/tasks/ip_whitelist.yml @@ -1,6 +1,7 @@ --- -- set_fact: +- name: "Define the whitelist from variables" + set_fact: fail2ban_ignore_ips: "{{ ['127.0.0.1/8'] | union(fail2ban_default_ignore_ips) | union(fail2ban_additional_ignore_ips) | unique }}" - name: Update ignoreips lists @@ -12,4 +13,4 @@ notify: restart fail2ban tags: - fail2ban - - ips \ No newline at end of file + - ips diff --git a/fail2ban/tasks/main.yml b/fail2ban/tasks/main.yml index e496c07e..13ae8163 100644 --- a/fail2ban/tasks/main.yml +++ b/fail2ban/tasks/main.yml @@ -15,7 +15,8 @@ tags: - fail2ban -- set_fact: +- name: "Define ip whitelist from variables" + set_fact: fail2ban_ignore_ips: "{{ ['127.0.0.1/8'] | union(fail2ban_default_ignore_ips) | union(fail2ban_additional_ignore_ips) | unique }}" tags: - fail2ban