|
@@ -12,6 +12,9 @@
|
12
|
12
|
|
13
|
13
|
- name: add stretch-backport for fail2ban with IPv6 support
|
14
|
14
|
apt_repository: repo='deb http://deb.debian.org/debian stretch-backports main' state=present update_cache=yes
|
|
15
|
+ tags:
|
|
16
|
+ - dependencies
|
|
17
|
+ when: ansible_distribution_version == '9'
|
15
|
18
|
|
16
|
19
|
- name: Install newer fail2ban with IPv6 support
|
17
|
20
|
apt:
|
|
@@ -20,6 +23,15 @@
|
20
|
23
|
default_release: stretch-backports
|
21
|
24
|
tags:
|
22
|
25
|
- dependencies
|
|
26
|
+ when: ansible_distribution_version == '9'
|
|
27
|
+
|
|
28
|
+- name: Install fail2ban
|
|
29
|
+ apt:
|
|
30
|
+ name: "fail2ban"
|
|
31
|
+ state: present
|
|
32
|
+ tags:
|
|
33
|
+ - dependencies
|
|
34
|
+ when: ansible_distribution_version == '10'
|
23
|
35
|
|
24
|
36
|
- name: Copy fail2ban configuration into place
|
25
|
37
|
template: src=etc_fail2ban_jail.local.j2 dest=/etc/fail2ban/jail.local
|