I'm trying to use puppet to manage a directory full of files. Files are
each a collected resource. In my case, they're part of nagios. But I
can't really get it to work. The purge on the directory doesn't take
into account the collected resources, so they end up racing.
My code is basically:
class server {
Nagios_service <<||>>
file { "/etc/naginator/services.d":
ensure => directory,
recurse => true,
replace => true,
purge => true,
require => File["/etc/naginator"],
}
}
class target {
@@nagios_service { "check_ping-${hostname}":
ensure => present,
check_command => "check_ping!100.0,20%!500.0,60%",
use => "generic-service",
host_name => "$fqdn",
target => "/etc/naginator/services.d/ping-$fqdn.cfg",
}
}
I see a couple of threads from last year about this, but no really
satisfying conclusions. It sounds like most people end up adding a
dependency which causes everything to purge and then be recreated
anew. Which feels like a lot of churn.
Do folks have a nice solution for this?
seph
--
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.