This is a bit over my head, so I’m going to ask.
I have several environments, with many variables defined using group_vars, e.g.
test1/group_vars/all
test2/group_vars/all
I have mule in each environment, and I need to tailor a file which tells must what libraries to load. We can it main.xml, one for each environment. Different teams should be able to include or exclude the libraries they wish to work with.
So I can’t have a global or completely static main.xml.j2 template. I do now, and I only replace a hostname, but this will not suffice.
I have to construct main.xml.
test1: main.xml might have
spring:beans
<spring:import resource=“a.xml”/>
<spring:import resource=“b.xml”/>
<spring:import resource=“c.xml”/>
<spring:import resource=“d.xml”/>
<spring:import resource=“e.xml”/>
</spring:beans>
while test2 main.xml might have
spring:beans
<spring:import resource=“a.xml”/>
<spring:import resource=“b.xml”/>
<spring:import resource=“c.xml”/>
</spring:beans>
In group_vars/all for each environment, I want
test1/group_vars/all
spring: a,b,c,d,e
test2/group_vars/all
spring: a,b,c
How should I construct my template file for this to work?