Hi,
Let’s say I have a deployment that consists of a bunch of services and a “meta-service” that is supposed to watch over each of them (this can be a monitoring agent, a log collector or whatever). I have separate roles for setting up each of them. However, this meta-service needs a specific piece of config for each of the other services. How should I best deploy these configs? I see two approaches:
a) keep all of them in meta-service role
b) keep them in respective services’ roles (i.e. meta-service’s config for managing component X is installed in role X)
Both of these solutions have drawbacks:
In a), I cannot easily use variables from component X role. For example, if I have a variable component_x_log_path and I need it in my meta-service’s config, I have to include_vars
(and the problem is that the variable may be in role defaults, but may also be overridden by inventory vars, and things get ugly)
In b), there is no clear separation of concerns, and it’s harder to e.g. run a test deployment without this meta-service, or only with it (because tasks are spread over multiple roles). And I cannot easily use variables from the meta-service role.
What are your opinions?
thanks
Jan