Not sure if you can specify variables by the extension, but there are plenty places you can set such variables:
See Using Variables — Ansible Community Documentation
For role, it might make sense to put some sensible default value under tests/local_setup/roles/validation/defaults/main.yml
.
For more complete list of places to put variables (and their precedence) can be found in the variable precedence docs