--- - hosts: all vars: php_enable_webserver: false php_version: "7.2" pre_tasks: - name: Update apt cache. apt: update_cache=yes cache_valid_time=600 when: ansible_os_family == 'Debian' roles: - role: geerlingguy.repo-remi when: ansible_os_family == 'RedHat' - role_under_test - geerlingguy.php