I'm having issues with vars precedence, hope you can help me here.
I'm currently using geerlingguy.ansible-role-postgresql as a dependency of my own postgresql role. Is define as a dependency in meta and I'm using import_role on my main task.
I was using vars/main.yml on my own role to override the defaults but now I need to extend my own role a bit like defining diferent variables depending from which group is the server in the inventory.
For this I use group_vars but with the vars/main.yml hack is impossible to override.
What would be the best practice here?
The problem here is that role vars (defined in role/vars/main.yml) have a higher variable precedence than group vars. There are two options to deal with this:
Forking the role would be my preferred option.