- name: Prepare hosts: all tasks: - name: Update the APT cache on Debian-based systems ansible.builtin.apt: update_cache: yes when: ansible_os_family == "Debian"