ansible-roles/fail2ban/tasks/ip_whitelist.yml
Mathieu Trossevin 440bec2feb
[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.
2020-12-23 15:06:42 +01:00

17 lines
434 B
YAML

---
- 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
ini_file:
dest: /etc/fail2ban/jail.local
section: "DEFAULT"
option: "ignoreip"
value: "{{ fail2ban_ignore_ips | join(' ') }}"
notify: restart fail2ban
tags:
- fail2ban
- ips