fail2ban: install local jail before starting
This commit is contained in:
parent
2077af2992
commit
3b93ba0768
|
@ -1,4 +1,26 @@
|
||||||
---
|
---
|
||||||
|
# We have to copy the local jail before installing the package
|
||||||
|
# or we risk being jailed by fail2ban
|
||||||
|
|
||||||
|
- name: Prepare /etc/fail2ban
|
||||||
|
file:
|
||||||
|
path: /etc/fail2ban
|
||||||
|
state: directory
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
mode: "0755"
|
||||||
|
tags:
|
||||||
|
- fail2ban
|
||||||
|
|
||||||
|
- name: local jail is installed
|
||||||
|
template:
|
||||||
|
src: jail.local.j2
|
||||||
|
dest: /etc/fail2ban/jail.local
|
||||||
|
mode: "0644"
|
||||||
|
notify: restart fail2ban
|
||||||
|
tags:
|
||||||
|
- fail2ban
|
||||||
|
|
||||||
- name: package is installed
|
- name: package is installed
|
||||||
apt:
|
apt:
|
||||||
name: fail2ban
|
name: fail2ban
|
||||||
|
@ -18,12 +40,3 @@
|
||||||
notify: restart fail2ban
|
notify: restart fail2ban
|
||||||
tags:
|
tags:
|
||||||
- fail2ban
|
- fail2ban
|
||||||
|
|
||||||
- name: local jail is installed
|
|
||||||
template:
|
|
||||||
src: jail.local.j2
|
|
||||||
dest: /etc/fail2ban/jail.local
|
|
||||||
mode: "0644"
|
|
||||||
notify: restart fail2ban
|
|
||||||
tags:
|
|
||||||
- fail2ban
|
|
||||||
|
|
Loading…
Reference in a new issue