configurations-ansible/roles/fail2ban-basic/tasks/main.yml

18 lines
437 B
YAML
Raw Normal View History

---
# tasks file for fail2ban-basic
#
- name: Fail2ban Configuration
2022-11-21 16:52:36 +01:00
when: fail2ban_enabled is true
block:
- name: Install Fail2ban
ansible.builtin.package:
name: "{{ fail2ban_package_name_by_os_family[ansible_os_family] }}"
- name: Enable Fail2ban service
when: "is_docker is not true"
ansible.builtin.systemd:
name: fail2ban
enabled: yes
state: started
masked: no