Variables and templates between roles

I may be way off in the way I’m trying to accomplish this, but I think I need to pass variables from one role to another.

I am setting up svn on a Suse server. I’m using the geerlingguy.apache and a rather modified geerlingguy.svn roles. I need the apache role available to deploy apache with various vhosts across a number of servers. So, my thought is that the vhosts should not be in the apache role, but in roles for the various different services that use apache, svn being one of them. So, I’d like to basically use the roles and templates from the apache role in the svn role.

Alternatively, I think I would put all the various vhost configurations into the apache role and somehow determine which one goes on which server. Unsure how to do that.

Looking for the best way forward since this idea will carry over into other roles as well and I want to get the structure correct. Thanks!

If you load the apache role in a play and then your vhosts role, you should be
able to use apache role vars (or set in defaults/ ) in the vhosts role, so long
as both roles are in the same play.

(we just did exactly this this afternoon, so let me know if it's not happening
for any reason).