There is quite a simple setup I am sure many of us have come across:
- You have lean, slim and dedicate roles
- Every role has its own role vars
- Playbooks include the roles
Let's assume you have a base path for an application, most likely you will need this path in many roles. To keep the roles independent you would define this base path in every role vars where needed.
Now you include some roles in a Playbook and in case of a change on e.g. the base path you need to change that in every role.
One help would be to use extra vars to overrule the role vars, but what if there are many potential candidates for a change?
So I would like to be able to include_vars
in a playbook to overrule the variables in the roles. But this is not possible as:
include_vars
is not allowed in Playbooksvar_files
(what would work in Playbooks) will be over written by role vars
Question: how do you do solve this situation? Maybe I want something odd and there is a much simpler way?