---
# Handlers main file for fail2ban role

- name: "HANDLER | Restart fail2ban"
  become: true
  ansible.builtin.service:
    name: "{{ fail2ban_service_name }}"
    state: "restarted"
  when: fail2ban_service_state != 'stopped' and molecule_yml is not defined
  tags:
    - "role::fail2ban"
    - "role::fail2ban::config"
    - "role::fail2ban::install"
    - "role::fail2ban::service"
