--- - name: Ensure required packages are installed package: name: "{{ dev_tools_packages }}" state: present cache_valid_time: "{{ apt_cache_valid_time if ansible_os_family == 'Debian' else omit }}" update_cache: "{{ True if ansible_os_family == 'Debian' else omit }}" become: True