I've never set vars inside the playbook but I've seen it done. I'm not really a fan of that structure because different applications/environments might use the same role and having the vars set within the playbooks can cause a lot of problems or unintended consequences.
Without know your entire infrastructure it's difficult to answer but I specify variables in three separate locations
- <rolename>/defaults/main.yml
- <appname>/group_vars
- <appname>/host_vars
Ansible is quite flexible with its handling of variables and allows them to be specified in many different locations.