--- - name: Prepare hosts: all tasks: - name: Update apt cache ansible.builtin.apt: update_cache: true cache_valid_time: 3600 when: - ansible_facts['os_family'] | lower == 'debian'