---

# Main tasks file for fail2ban role

- name: 'INIT | Manage variables to use for our target'
  ansible.builtin.import_tasks: "{{ role_path }}/tasks/manage_variables.yml"
  tags:
    - 'role::fail2ban'
    - 'role::fail2ban::config'
    - 'role::fail2ban::install'


- name: 'INSTALL | Manage install on family OS'
  ansible.builtin.include_tasks: "{{ role_path }}/tasks/install_{{ ansible_os_family | lower }}.yml"
  tags:
    - 'role::fail2ban'
    - 'role::fail2ban::install'


- name: 'CONFIG | Include configuration tasks'
  ansible.builtin.import_tasks: "{{ role_path }}/tasks/manage_config.yml"
  tags:
    - 'role::fail2ban'
    - 'role::fail2ban::config'


- name: 'SERVICE | Include services tasks'
  ansible.builtin.import_tasks: "{{ role_path }}/tasks/manage_service.yml"
  tags:
    - 'role::fail2ban'
    - 'role::fail2ban::install'
    - 'role::fail2ban::service'
