voxpupuli / puppet-splunk

Manage Splunk servers and forwarders using Puppet
https://forge.puppet.com/puppet/splunk
Apache License 2.0
40 stars 121 forks source link

Duplicate declaration: Class[Splunk::Params] is already declared #235

Open posteingang opened 5 years ago

posteingang commented 5 years ago

Hi,

I test the current version of this module and had the following issue: Error: Evaluation Error: Error while evaluating a Resource Statement, Duplicate declaration: Class[Splunk::Params] is already declared

My Puppet profile looks like this:

class profile::splunk {

  include splunk::enterprise

  class { 'splunk::prams':
    src_root => 'http://...'
  }
}

Did i missunderstand the module documentation or i am on the wrong way? In my understanding the issue comes with the inheritance of the params class, which will be automatic defined by the class splunk::enterprise.

How can I provide my own values for the splunk::enterprise module (without hiera)? I think it makes no sense to make the params class parameterized.

regards, Martin

deadstick6 commented 5 years ago

I ran into this as well. Define splunk::params first. Same thing applies when calling the splunk::forwarder.


    class { '::splunk::params':
        version     =>  "7.2.6",
        build       =>  "c0bf0f679ce9",
        src_root    =>  "puppet:///data_files/splunk/files"
    }
    include ::splunk
}
Tokynet commented 5 years ago

FWIW, the solution @deadstick6 provided worked for me. Using v7.3.0 of the module.