--- # The image ships ufw and no APT lists; the check step needs ufw gone and the lists back, or the # install task cannot even preview the package. - name: Prepare a host without ufw hosts: all gather_facts: false tasks: - name: Purge ufw ansible.builtin.apt: name: ufw state: absent purge: true - name: Refresh the APT cache ansible.builtin.apt: update_cache: true