- name: Prepare hosts: all tasks: - name: Update apt cache apt: update_cache: yes become: true when: ansible_os_family == 'Debian'