Hi,
I have the following:
class nagios {
include nagios::params
file { [ "${nagios::params::nagios_confdir}",
"${nagios::params::nagios_confdir}/app_alerts",
"${nagios::params::nagios_confdir}/app_alerts/ssa",
"${nagios::params::nagios_confdir}/app_alerts/ssa/
services" ]:
ensure => directory,
owner => 'root',
group => 'root',
mode => 755,
}
define couchdb_check () {
$couchdb_bind_address = "localhost"
$couchdb_port = "5984"
$couchdb_baseurl = "http://${couchdb_bind_address}:$
{couchdb_port}"
$couchdb_url = "${couchdb_baseurl}/nagios_alerts/${name}"
nagios_service { "ssa_${name}":
target => "${nagios::params::nagios_confdir}/app_alerts/ssa/
services/${name}.cfg",
use => "pnp4nagios-service",
service_description => couchdblookup($couchdb_url, "desc"),
require => File["${nagios::params::nagios_confdir}/app_alerts/
ssa/services"]
}
}
}
class ssa::nagios {
include nagios
nagios::couchdb_check { ["check1", "check2" ]: }
}
So there is ssa::nagios that includes nagios class
but I get error
err: Could not run Puppet configuration client: Could not find
dependency File[/etc/nagios/conf.d/app_alerts/ssa/services] for
Nagios_service[check1] at /etc/puppet/modules/nagios/manifests/init.pp:
32
Changed "include nagios" to "require nagios" - same error.
Of course nagios::params::nagios_confdir=/etc/nagios/conf.d
And nagios class is supposed to be evaluated before ssa::nagios - so
how come it does not find the File dependency declared in the nagios
class?
Thanks
Alex
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.