mirror of
https://github.com/DO1JLR/ansible_playbook_servers.git
synced 2024-09-14 19:53:56 +02:00
Add fail2ban and firewall
This commit is contained in:
parent
1505e8b26d
commit
5d872471bd
5 changed files with 18 additions and 1 deletions
6
.gitmodules
vendored
6
.gitmodules
vendored
|
@ -34,3 +34,9 @@
|
||||||
[submodule "roles/goaccess"]
|
[submodule "roles/goaccess"]
|
||||||
path = roles/goaccess
|
path = roles/goaccess
|
||||||
url = https://github.com/roles-ansible/ansible_role_goaccess.git
|
url = https://github.com/roles-ansible/ansible_role_goaccess.git
|
||||||
|
[submodule "roles/geerlingguy.firewall"]
|
||||||
|
path = roles/geerlingguy.firewall
|
||||||
|
url = https://github.com/geerlingguy/ansible-role-firewall.git
|
||||||
|
[submodule "roles/robertdebock.fail2ban"]
|
||||||
|
path = roles/robertdebock.fail2ban
|
||||||
|
url = https://github.com/robertdebock/ansible-role-fail2ban.git
|
||||||
|
|
|
@ -32,5 +32,12 @@ nginx_sites:
|
||||||
- name: 'c3woc.cn'
|
- name: 'c3woc.cn'
|
||||||
- name: 'www.c3woc.cn'
|
- name: 'www.c3woc.cn'
|
||||||
|
|
||||||
|
|
||||||
acme_notification_email: "acme_{{ inventory_hostname }}@l3d.yt"
|
acme_notification_email: "acme_{{ inventory_hostname }}@l3d.yt"
|
||||||
|
|
||||||
|
# firewall
|
||||||
|
firewall_allowed_tcp_ports:
|
||||||
|
- "22"
|
||||||
|
- "25"
|
||||||
|
- "80"
|
||||||
|
- "443"
|
||||||
|
fail2ban_destemail: "fail2ban_notify_{{ inventory_hostname }}@l3d.yt"
|
||||||
|
|
1
roles/geerlingguy.firewall
Submodule
1
roles/geerlingguy.firewall
Submodule
|
@ -0,0 +1 @@
|
||||||
|
Subproject commit adb052a45012227b217555c528f3213659c9f553
|
1
roles/robertdebock.fail2ban
Submodule
1
roles/robertdebock.fail2ban
Submodule
|
@ -0,0 +1 @@
|
||||||
|
Subproject commit a354bc92a63853b8d16a6292b0d9d629e18c2f95
|
2
site.yml
2
site.yml
|
@ -14,6 +14,8 @@
|
||||||
- { role: dotfiles, tags: [default,dotfiles]}
|
- { role: dotfiles, tags: [default,dotfiles]}
|
||||||
- { role: ssh_auth, tags: [default,users]}
|
- { role: ssh_auth, tags: [default,users]}
|
||||||
- { role: sshd, tags: [default,users]}
|
- { role: sshd, tags: [default,users]}
|
||||||
|
- { role: geerlingguy.firewall, tags: [default,firewall], become: true}
|
||||||
|
- { role: robertdebock.fail2ban, tags: [default,fail2ban], become: true}
|
||||||
|
|
||||||
- name: deploy web config
|
- name: deploy web config
|
||||||
hosts: web
|
hosts: web
|
||||||
|
|
Loading…
Reference in a new issue