--- - hosts: all pre_tasks: - name: Update apt cache. apt: update_cache=yes when: ansible_distribution == 'Ubuntu' roles: - geerlingguy.git - role_under_test