new version
Some checks failed
Some checks failed
This commit is contained in:
@@ -1,23 +1,9 @@
|
||||
---
|
||||
- name: Install fail2ban
|
||||
ansible.builtin.apt:
|
||||
name: fail2ban
|
||||
state: present
|
||||
when: ansible_os_family == "Debian"
|
||||
|
||||
- name: Configure fail2ban jail
|
||||
- name: Configuration Fail2Ban
|
||||
ansible.builtin.template:
|
||||
src: fail2ban.jail.local.j2
|
||||
dest: "{{ fail2ban_config_dir }}/jail.local"
|
||||
src: fail2ban-jail.local.j2
|
||||
dest: "{{ fail2ban_config_path }}"
|
||||
owner: root
|
||||
group: root
|
||||
mode: '0644'
|
||||
backup: yes
|
||||
notify: restart fail2ban service
|
||||
|
||||
- name: Ensure fail2ban is started and enabled
|
||||
ansible.builtin.systemd:
|
||||
name: fail2ban
|
||||
state: started
|
||||
enabled: yes
|
||||
daemon_reload: yes
|
||||
notify: restart fail2ban
|
Reference in New Issue
Block a user