Currently, I am writing a puppet module for managing my sensu configuration.
Have split the whole thing into several classes and put them into their respective files in the sensu "manifests" directory:
sensu::common (common.pp)
sensu::common::package (common/package.pp)
sensu::common::config (common/config.pp)
sensu::server (server.pp)
sensu::server::config (server/config.pp)
In my server.pp
, I have the following
class sensu::server {
include sensu::common
include sensu::server::config
Class['sensu::common'] -> Class['sensu::server::config']
}
And the nodes.pp
looks like this:
class role_monitoring_server {
$my_role = 'monitoring_server'
...
include sensu::server
}
node my_cool_server {
include role_monitoring_server
}
As most of you might have guessed, I have trouble with the class dependency in server.pp
:
Class['sensu::common'] -> Class['sensu::server::config']
just does not work. The class sensu::server::config
needs to place a file in a directory, that will only be created by sensu::common
. The thing is, that sensu::server::config
will always be applied before sensu::common
and not after as expected.
What do I miss? There are so many questions out there on the web but I just don't find an answer, since I don't know what to look for.