---

- name: 'INSTALL | APT | Install fail2ban packages'
  ansible.builtin.apt:
    name: "{{ item.name }}"
    state: "{{ item.state | default('present') }}"
    update_cache: "{{ fail2ban_repository_update_cache }}"
    cache_valid_time: "{{ fail2ban_repository_cache_valid_time }}"
  become: true
  with_items: "{{ fail2ban_packages }}"
  notify:
    - 'HANDLER | Restart fail2ban'
