How to manage things like connectionstrings?

So, I recognize this might be obvious to some people from the documentation. It’s more about how best to do something as opposed how to that all. I’m using keycloak management as an example, but it applies to other things.

I’d like to have ansible manage keycloak clusters. The current keycloak modules in galaxy support doing various things over the REST API, like adding realms, users etc, and can be run against localhost to execute requests against a remote keycloak cluster.

So, how do I best represent the keycloak clusters in keycloak? They basically need variables for the admin url, username, password and client. Can I put multiple clusters in an inventory such that the tasks are still run against localhost? Would it be better to have roles defining those variables and somehow loop them from another datasource?`

I figure this is a recurring topic… For example consider you have a list of postgres connectionstrings for admin access to different database. Or any other database connectionstrings.

I’m probably missing something basic, but can’t quite wrap my head around it.

Hey, @sobatendo , I just now saw this sitting here unanswered since October, '23. Is this resolved now, or do you still have questions about it?