how to implement a multi-tenant configuration solution in ansible

Hello!

One common pattern I’ve seen in many applications is multitenancy. Basically, I’m configuring an application that has some of its configuration values which are different based on the country. The way I’ve managed to do this configuration is basically using a “partners” dictionary in yaml:

Hi,
I have related issue and i implemented this as lookup plugin that return a value, based on another vars (like find image_id based on aws region) and this is working,

but my vars contain {{var}} , and not interpolated

like:
root_vars:
us-east-1:
sec_groups: {{app}}-public

and then i ask for “sec_groups” i got “{{app}}-public” and not “my-app-piblic”

i use ansible 1.9.2

Thanks for help.

ahh usage of plugin is:

image: “{{ lookup(‘instance_var_provider’, ‘image_id’) }}”