forked from evolix/ansible-roles
59c479582e
You can already skip nginx and apache ip_whitelist tasks with this tags, it makes sense for fail2ban to follow suite.
15 lines
387 B
YAML
15 lines
387 B
YAML
---
|
|
|
|
- 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 |