- name: Install fail2ban apt: name: fail2ban state: latest notify: fail2ban_restart - name: Upload jail.local template {{ fail2ban_tmpl }} template: src: "../{{ fail2ban_tmpl }}.j2" dest: "{{ fail2ban_file }}" owner: "{{ fail2ban_user }}" group: "{{ fail2ban_group }}" mode: "{{ fail2ban_mode }}" notify: fail2ban_restart