I'm developing a custom puppet module for managing JBoss Application Servers. I consider each application deployed on the appserver as a self-contained resource. But some of the applications need dedicated config changes in JBoss' configuration file.
Each application is a puppet resource as well but most of the applications do not know each other.
At the moment I perform changes on JBoss' configuration file using augeas. That works even if many resources require changes on that config file but it is very complicated, error prone, and slow.
Actually I want to use templating for the config file but the question is how I can aggregate all required artifacts coming from different (sub-)modules before triggering the templating mechanism without having to know how man config artifacts there are?
Example:
define jboss_config($config) {
# do something with the config
}
jboss_config {
config => 'some configuration for app 1'
}
jboss_config {
config => 'some configuration for app 2'
}
jboss_config {
config => 'some configuration for app 3'
}
jboss_config {
config => 'some configuration for app 4'
}
jboss_config {
config => 'some configuration for app 5'
}
#now, as all calls to "jboss_config" are done,
#perform templating of the configuration file.
How can I define a dependency that triggers the templating once after all calls of "jboss_config" are done? Notify doesn't seem to work because it would trigger templating after each configuration step.