add fail2ban role

This commit is contained in:
2022-01-19 18:17:44 +00:00
parent 0f22dbcc5c
commit d800b33c20
4 changed files with 977 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
---
- name: install fail2ban package
apt:
name: fail2ban
state: present
update_cache: yes
when: ansible_distribution=='Debian' or ansible_distribution=='Ubuntu'
become: yes
tags: fail2ban
- name: copy fail2ban local config
copy:
src: "{{ role_path }}/files/jail.local"
dest: /etc/fail2ban/jail.local
owner: root
group: root
mode: 0644
become: yes
tags: fail2ban