ansible new structure

This commit is contained in:
Christian Lempa
2022-09-04 09:35:11 +02:00
parent fc830023b9
commit 626cf6d47f
3 changed files with 3 additions and 0 deletions

View File

@@ -0,0 +1,3 @@
[sshd]
enabled = true
bantime = 3600

View File

@@ -0,0 +1,18 @@
---
- hosts: all
become: yes
tasks:
- name: install fail2ban
apt:
name:
- fail2ban
update_cache: yes
- name: copy fail2ban configfiles
copy:
src: configfiles/debian-sshd-default.conf
dest: /etc/fail2ban/jail.d/debian-sshd-default.conf
- name: restart fail2ban
systemd:
state: restarted
daemon_reload: yes
name: fail2ban