# QUESTION:
My problem and my question is how can I extract the common stuff. Creating the user (via a variable), setting up the folder that the application has permission to log to, to starting the init stuff.
My initial route (which worked) was to create one role for the application, that had its variables files and templates in it and did all of the init stuff, but that’s not reusable for other projects.
Now I'd like to create a role for starting a java-service, that could be called from the application specific role. That sets- up the common stuff to all our Java services. However I can't see how to invoke a role with
variables during execution of another role.
Another approach I would consider is creating the application specific role as a specialisation of the generic service role, However that doesn't seem to make sense either.
So the problem as I see it is that If I use a playbook to do all these role pieces the variables need to be top level and not application specific. If I use a role I can't find a way to invoke another set of subtasks(role) inside.
Both the service role and the application role would have their own templates.
Just looking for the best practice to avoid copy paste.
Wes