- name: restart fail2ban
  systemd:
    name: fail2ban
    state: restarted

- name: reload fail2ban jails
  shell: type fail2ban-server > /dev/null && (fail2ban-client ping > /dev/null && fail2ban-client reload > /dev/null || true) || true
