2023-10-17 13:10:41 +00:00
|
|
|
---
|
|
|
|
|
2023-12-19 14:55:30 +00:00
|
|
|
- hosts: '{{ ip_addr }}'
|
2023-10-17 13:10:41 +00:00
|
|
|
become: yes
|
|
|
|
become_method: sudo
|
2023-10-18 12:24:17 +00:00
|
|
|
gather_facts: yes
|
2023-10-17 13:10:41 +00:00
|
|
|
|
|
|
|
tasks:
|
2023-10-19 10:14:13 +00:00
|
|
|
|
2024-02-14 16:45:42 +00:00
|
|
|
- name: "[CONFIG FAIL2BAN] Comprobando si es necesario configurar fail2ban "
|
|
|
|
debug:
|
|
|
|
msg: "No es necesario configurar fail2ban en la máquina"
|
|
|
|
when: fail2ban_enabled is not defined or not fail2ban_enabled
|
|
|
|
|
2023-10-19 12:41:37 +00:00
|
|
|
- name: "[CONFIG FAIL2BAN] Install and configure fail2ban service"
|
|
|
|
import_role:
|
|
|
|
name: config-fail2ban
|
2024-02-15 16:59:13 +00:00
|
|
|
when: fail2ban_enabled is defined and fail2ban_enabled
|