Fix Fail2ban installation process
This commit is contained in:
parent
09376d3cd1
commit
886232e1aa
@ -5,9 +5,3 @@
|
|||||||
name: sshd
|
name: sshd
|
||||||
state: restarted
|
state: restarted
|
||||||
listen: "restart sshd"
|
listen: "restart sshd"
|
||||||
|
|
||||||
- name: Restart fail2ban service
|
|
||||||
ansible.builtin.service:
|
|
||||||
name: fail2ban
|
|
||||||
state: restarted
|
|
||||||
listen: "restart fail2ban"
|
|
||||||
|
@ -1,15 +1,19 @@
|
|||||||
---
|
---
|
||||||
- name: Install fail2ban
|
- name: Ensures fail2ban dir exists
|
||||||
ansible.builtin.package:
|
file:
|
||||||
name: fail2ban
|
path: /etc/fail2ban
|
||||||
state: present
|
state: directory
|
||||||
|
|
||||||
- name: Configure fail2ban
|
- name: Configure fail2ban
|
||||||
copy:
|
copy:
|
||||||
src: ../templates/fail2ban.conf
|
src: ../templates/fail2ban.conf
|
||||||
dest: /etc/fail2ban/fail2ban.conf
|
dest: /etc/fail2ban/fail2ban.conf
|
||||||
backup: yes
|
backup: yes
|
||||||
notify: restart fail2ban
|
|
||||||
|
- name: Install fail2ban
|
||||||
|
ansible.builtin.package:
|
||||||
|
name: fail2ban
|
||||||
|
state: present
|
||||||
|
|
||||||
- name: Disable password login
|
- name: Disable password login
|
||||||
lineinfile:
|
lineinfile:
|
||||||
|
Loading…
Reference in New Issue
Block a user