Add fail2ban for traefik
Remote action coming soon
This commit is contained in:
15
ansible/roles/traefik/tasks/fail2ban.yml
Normal file
15
ansible/roles/traefik/tasks/fail2ban.yml
Normal file
@ -0,0 +1,15 @@
|
||||
- name: Create jail
|
||||
template:
|
||||
src: files/fail2ban/traefik-jail.conf
|
||||
dest: /etc/fail2ban/jail.d/traefik.conf
|
||||
mode: 0644
|
||||
become: true
|
||||
notify: restart fail2ban
|
||||
|
||||
- name: Create filter
|
||||
template:
|
||||
src: files/fail2ban/traefik-filter.conf
|
||||
dest: /etc/fail2ban/filter.d/traefik.conf
|
||||
mode: 0644
|
||||
become: true
|
||||
notify: restart fail2ban
|
@ -77,3 +77,14 @@
|
||||
notify: restart traefik
|
||||
when: traefik_provider_grafana
|
||||
become: true
|
||||
|
||||
- name: logrotate config
|
||||
template:
|
||||
src: files/logrotate.conf
|
||||
dest: /etc/logrotate.d/traefik
|
||||
mode: "0600"
|
||||
become: true
|
||||
|
||||
- name: fail2ban
|
||||
include: fail2ban.yml
|
||||
when: with_fail2ban
|
||||
|
Reference in New Issue
Block a user