--- - name: Install fail2ban become: true apt: name: fail2ban state: present update_cache: true - name: Configure fail2ban for nftables become: true copy: src: 00-banactions-nft.conf dest: /etc/fail2ban/jail.d/00-banactions-nft.conf owner: root group: root mode: 0644 notify: Restart fail2ban service