Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
posteingang opened this issue May 6, 2019 · 2 comments · May be fixed by #250
Open

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

posteingang opened this issue May 6, 2019 · 2 comments · May be fixed by #250

Comments

@posteingang
Copy link

posteingang commented May 6, 2019

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
Copy link

deadstick6 commented May 9, 2019

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
Copy link

Tokynet commented Jun 14, 2019

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

nick-markowski added a commit to nick-markowski/puppet-splunk that referenced this issue Jul 31, 2019
* Moved defaults to module data, and removed the params class
* Privatized all `splunk::enterprise::` and `splunk::forwarder::` install,
  config, and service classes
* Added a `$release` param, which replaces the `$version` param
  * For ensurable package_providers, the release is used as the Splunk package
    ensure, if specified
  * The version/release no longer defaults to a specific version and build,
    instead, the Splunk package resource defaults ensure to 'installed'
  * Added a Splunk::Release type
* Added a service_ensure param, per voxpupuli#249
* Modified splunk*_version facts to be part of splunkforwarder and splunkenterprise
  fact hashes
* Removed init.pp, which only served to confuse
* `$[enterprise,forwarder]_package_src` and `$package_source` params renamed to
  `$managed_package_source` and `$unmanaged_package_source`, for clarity
* Fixed: enterprise and forwarder password classes cross-referenced params

Fixes voxpupuli#230
Fixes voxpupuli#232
Fixes voxpupuli#235
Fixes voxpupuli#249
nick-markowski added a commit to nick-markowski/puppet-splunk that referenced this issue Jul 31, 2019
* Moved defaults to module data, and removed the params class
* Privatized all `splunk::enterprise::` and `splunk::forwarder::` install,
  config, and service classes
* Added a `$release` param, which replaces the `$version` param
  * For ensurable package_providers, the release is used as the Splunk package
    ensure, if specified
  * The version/release no longer defaults to a specific version and build,
    instead, the Splunk package resource defaults ensure to 'installed'
  * Added a Splunk::Release type
* Added a service_ensure param, per voxpupuli#249
* Modified splunk*_version facts to be part of splunkforwarder and splunkenterprise
  fact hashes
* Removed init.pp, which only served to confuse
* `$[enterprise,forwarder]_package_src` and `$package_source` params renamed to
  `$managed_package_source` and `$unmanaged_package_source`, for clarity
* Fixed: enterprise and forwarder password classes cross-referenced params

Fixes voxpupuli#230
Fixes voxpupuli#232
Fixes voxpupuli#235
Fixes voxpupuli#249
nick-markowski added a commit to nick-markowski/puppet-splunk that referenced this issue Jul 31, 2019
* Moved defaults to module data, and removed the params class
* Privatized all `splunk::enterprise::` and `splunk::forwarder::` install,
  config, and service classes
* Added a `$release` param, which replaces the `$version` param
  * For ensurable package_providers, the release is used as the Splunk package
    ensure, if specified
  * The release no longer defaults to a specific version and build, instead,
    the Splunk package resource defaults ensure to 'installed'
  * Added a Splunk::Release type
* Added a service_ensure param, per voxpupuli#249
* Modified splunk*_version facts to be part of splunkforwarder and splunkenterprise
  fact hashes
* Removed init.pp, which only served to confuse
* `$[enterprise,forwarder]_package_src` and `$package_source` params renamed to
  `$managed_package_source` and `$unmanaged_package_source`, for clarity
* Fixed: enterprise and forwarder password classes cross-referenced params

Fixes voxpupuli#230
Fixes voxpupuli#232
Fixes voxpupuli#235
Fixes voxpupuli#249
nick-markowski added a commit to nick-markowski/puppet-splunk that referenced this issue Jul 31, 2019
* Moved defaults to module data, and removed the params class
* Privatized all `splunk::enterprise::` and `splunk::forwarder::`
  install, config, and service classes
* Added a `$release` param, which replaces the `$version` param
  * For ensurable package_providers, the release is used as the
    Splunk package ensure, if specified
  * The release no longer defaults to a specific version and build,
    instead, the Splunk package resource defaults ensure to 'installed'
  * Added a Splunk::Release type
* Added a service_ensure param, per voxpupuli#249
* Modified splunk*_version facts to be part of splunkforwarder and
  splunkenterprise fact hashes
* Removed init.pp, which only served to confuse
* `$[enterprise,forwarder]_package_src` and `$package_source` params
  renamed to `$managed_package_source` and `$unmanaged_package_source`,
  for clarity
* Fixed: enterprise and forwarder password classes cross-referenced params

Fixed voxpupuli#230
Fixed voxpupuli#232
Fixed voxpupuli#235
Fixed voxpupuli#249
@nick-markowski nick-markowski linked a pull request Jul 31, 2019 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants