Add fail2ban role for ansible

This commit is contained in:
2020-04-19 23:30:19 +00:00
parent 20071c135c
commit b520c2bfe8
102 changed files with 3726 additions and 0 deletions

View File

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

View File

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

View File

@@ -0,0 +1,7 @@
---
# tasks file for /etc/ansible/roles/nginx
- import_tasks: install.yml
- import_tasks: configure.yml
- import_tasks: service.yml

View File

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