well I *think* this is the problem?

the init.pp file
class fly-nagios::base {

        include nrpe::base

        case $hostname {
                "web01":        { $var_NRPE_HOST_IP_ADDRESS =
$ipaddress_eth0 }
                "db02","web02": { $var_NRPE_HOST_IP_ADDRESS =
$ipaddress_eth2 }
                "white":        { $var_NRPE_HOST_IP_ADDRESS =
$ipaddress_eth0 }
                default:        { $var_NRPE_HOST_IP_ADDRESS =
$ipaddress_eth1 }
        }

        $var_NRPE_NAGIOS_SERVERS_IP_ADDRESS = "192.168.0.18,192.168.0.19"

        file { "nrpe.cfg" :
                path => "/etc/nagios/nrpe.cfg",
                content => template("fly-nagios/etc/nagios/nrpe.cfg"),
                mode => 444, owner => bin, group => bin,
                ensure => file,
                notify => Service[ "nrpe" ],
                require => $operatingsystem ? {
                                "centos" => Package[ "nagios-nrpe" ],
                                "redhat" => Package[ "nagios-nrpe" ],
                                "debian" => Package[ "nagios-nrpe-server" ],
                                "ubuntu" => Package[ "nagios-nrpe-server" ],
                },
        }

}

import "client.pp"
import "server.pp"


=== the client.pp is what I sent before...

It this a loop in what I do ???

maybe the base class should use inherits instead of include ??

thanks!



On Mon, Sep 13, 2010 at 8:38 PM, Nan Liu <[email protected]> wrote:

> On Mon, Sep 13, 2010 at 7:13 PM, Luc Suryo <[email protected]> wrote:
>
>> The reason of checking the directory is because sometime we have server
>> with special installation
>> and hence do not have the nagios-plugins packages installed.. but still it
>> does not work..
>>
>
> The directory resource is perfectly fine. I was just commenting on the
> implicit resource dependency for files.
>
>
>> Well let me cut and past the whole file:
>>
>> class fly-nagios::client inherits fly-nagios::base {
>>
>>         include nagios::base
>
>
> I ran a quick module test include fly-nagios::client with a stub
> fly-nagios::base and a nagios::base and it's passing the test without any
> issues:
>
> notice: //fly-nagios::client/File[/usr/lib64/nagios/plugins]/ensure: is
> absent, should be directory (noop)
> ...
> notice:
> //fly-nagios::client/Fly-nagios::Client::Nagiosplugins[check_outgoing_traffic]/File[check_outgoing_traffic]/ensure:
> is absent, should be file (noop)
>
> err: Could not retrieve catalog from remote server: Error 400 on SERVER:
>> Duplicate definition: Fly-nagios::Client::Nagiosplugins[check_fly_kestrel]
>> is already defined in file
>> /var/lib/puppet/fly/modules/fly-nagios/manifests/client.pp at line 40;
>> cannot redefine at
>> /var/lib/puppet/fly/modules/fly-nagios/manifests/client.pp:40 on node puppet
>>
>
> I checked where the error is raised in source code. I know this isn't an
> issue with the code in the email, but the only way I was able to duplicate
> the error so it shows the same puppet manifest file and same line number is
> to include check_disk.pl twice in the resource array (error is last line
> of the array):
>
> nagiosPlugins { [
>         "check_disk.pl",
>         ...
>         "check_disk.pl",
>         ...
>
> Duplicate definition: Fly-nagios::Client::Nagiosplugins[check_disk.pl] is
> already defined in file /etc/puppet/modules/fly-nagios/manifests/client.pp
> at line 38; cannot redefine at
> /etc/puppet/modules/fly-nagios/manifests/client.pp:38 on node
> puppet.training.lan
>
> If that's not the source of the problem, I'm out of ideas at the moment.
>
> Thanks,
>
> Nan
>
> --
> 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]<puppet-users%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/puppet-users?hl=en.
>



-- 
-ls

-- 
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.

Reply via email to