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

Hard coded dependency net-tools #275

Closed
jose-lmax opened this issue Feb 17, 2020 · 0 comments · Fixed by #296
Closed

Hard coded dependency net-tools #275

jose-lmax opened this issue Feb 17, 2020 · 0 comments · Fixed by #296

Comments

@jose-lmax
Copy link

Affected: Puppet

How to reproduce (e.g Puppet code you use)

class profile::splunk_master(
$version = latest,
$build = undef,
$managepassword = true,
$splunkuser = 'splunk_admin',
$password = 'secret',
$webport = 443
) inherits profile {
ensure_packages(['net-tools'])

class { 'splunk::params':
version => $version,
build => $build,
}

class { 'splunk::enterprise':
package_ensure => latest,
manage_password => $managepassword,
splunk_user => $splunkuser,
package_provider => 'rpm',
web_httpport => $webport,
password_hash => $password,
}

What are you seeing

Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Evaluation Error: Error while evaluating a Function Call, Duplicate declaration: Package[net-tools] is already declared; cannot redeclare (file: /etc/puppetlabs/code/environments/production/modules/splunk/manifests/enterprise/install/nix.pp, line: 36, column: 5) on node splunk.lmax

What behaviour did you expect instead

To don't get that error, the dependency of that package should not be hard coded in nix.pp, probably the solution is to use require => Package['net-tools']

Output log

Any additional information you'd like to impart

martijndegouw added a commit to martijndegouw/puppet-splunk that referenced this issue Nov 2, 2020
ensure_packages uses all parameters for the hash, but other instances
of ensure_packages['net-tools'] do not all specify the before option.

See https://tickets.puppetlabs.com/browse/MODULES-8733
Solving issue voxpupuli#275
martijndegouw added a commit to martijndegouw/puppet-splunk that referenced this issue Nov 3, 2020
ensure_packages uses all parameters for the hash, but other instances
of ensure_packages['net-tools'] do not all specify the before option.

See https://tickets.puppetlabs.com/browse/MODULES-8733
Solving issue voxpupuli#275
martijndegouw added a commit to martijndegouw/puppet-splunk that referenced this issue Nov 3, 2020
ensure_packages uses all parameters for the hash, but other instances
of ensure_packages['net-tools'] do not all specify the before option.

See https://tickets.puppetlabs.com/browse/MODULES-8733
Solving issue voxpupuli#275
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.

1 participant