Update to more recent Ansible roles

This commit is contained in:
2020-11-25 11:38:20 +00:00
parent 96182bb06a
commit 59d482cad7
47 changed files with 2970 additions and 38 deletions

View File

@@ -10,7 +10,8 @@ nginx_http_auth: "true"
nginx_nobinary: "true"
nginx_nohome: "true"
nginx_noproxy: "true"
nginx_noscan: "true"
nginx_wplogin: "true"
nginx_noscan: "true"
nginx_noenv: "true"
nginx_noscript: "true"
sshd: "true"

View File

@@ -394,7 +394,16 @@ port = http,https
filter = nginx-noenv
logpath = /var/log/nginx/access.log
maxretry = 1
bantime = 4
bantime = 4h
[nginx-wplogin]
enabled = {{ nginx_wplogin }}
port = http,https
filter = nginx-wplogin
logpath = /var/log/nginx/access.log
maxretry = 1
bantime = 4h
[nginx-nobinary]
@@ -407,7 +416,7 @@ bantime = -1
[sshd-badproto]
enabled = {{ sshd_badproto }}
port = {{ ssh+port }}
port = {{ ssh_port }}
filter = sshd-badproto
logpath = /var/log/auth.log
maxretry = 1

View File

@@ -1,7 +1,7 @@
---
- name: Copy fail2ban jail.local configuration
- name: Copy jail.local configuration
template: src=files/fail2ban/jail.local dest=/etc/fail2ban/jail.local
- name: Copy fail2ban jail filters
- name: Copy jail filters
copy: src=files/fail2ban/filter.d/ dest=/etc/fail2ban/filter.d/

View File

@@ -1,4 +1,4 @@
---
- name: Install packages
apt: name="{{ item }}" state=latest
package: name="{{ item }}" state=present
with_items: "{{ packages }}"

View File

@@ -1,3 +1,3 @@
---
- name: Start and enable fail2ban service
- name: Start and enable services
service: name=fail2ban state=restarted enabled=yes