Hello
I been Google-ing and read docs for couple hours and can not see what
I do wrong... can someone help?
in my nodes i have
include our-nagios::client
the the our-nagios::client looks like this
class our-nagiios::client {
case $operatingsystem {
"centos" : { $nagios_plugins_dir = "/usr/lib64/nagios/
plugins" }
"redhat" : { $nagios_plugins_dir = "/usr/lib64/nagios/
plugins" }
"debian" : { $nagios_plugins_dir = "/usr/lib/nagios/
plugins" }
"ubuntu" : { $nagios_plugins_dir = "/usr/lib/nagios/
plugins" }
}
define my_nagios_plugins ( $name ) {
file { "$name" :
name => "$nagios_plugins_dir/$name",
source => "puppet:///nagios/etc/nagios/bin/
$name",
mode => 0555, owner => bin, group => bin,
replace => true,
ensure => file,
after => File [ "$nagios_plugins_dir" ],
}
}
file { "$nagios_plugins_dir" :
name => "$nagios_plugins_dir",
mode => 0755, owner => bin, group => bin,
ensure => directory,
}
my_nagios_plugins { [
"check_disk.pl",
"check_kestrel",
"check_mongo",
"check_fmongo_repl",
"check_memcached.py",
"check_mmm_agent",
"check_mmm_mon",
"check_mmm_mon_cluster",
"check_outgoing_traffic",
"check_ram" ]:
}
}
What I want todo is able to add (and later remove) plugins with the
correct permissions and ownerschip...
and rather not to have to duplicate the 'file' entry for each plugins
but I keep getting this error:
err: Could not retrieve catalog from remote server: Error 400 on
SERVER: Duplicate definition: Our-
nagios::Client::My_nagios_plugins[check_kestrel] is already defined in
file /var/lib/puppet/our/modules/our-nagios/manifests/client.pp at
line 51; cannot redefine at /var/lib/puppet/our/modules/our-nagios/
manifests/client.pp:51 on node puppet
What do I do wrong? can some please help?
thanks
--
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.