Skip to content
This repository was archived by the owner on Jan 15, 2024. It is now read-only.
This repository was archived by the owner on Jan 15, 2024. It is now read-only.

Issue with wget ensure => installed #43

@den-is

Description

@den-is

In my case there is issue with

  ensure_packages(['wget'], {
    ensure => installed,
})

Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Evaluation Error: Error while evaluating a Resource Statement, Evaluation Error: Error while evaluating a Function Call, Duplicate declaration: Package[wget] is already declared in file /etc/puppetlabs/code/environments/development/modules/sysadmin/manifests/base.pp:2; cannot redeclare at /etc/puppetlabs/code/environments/development/modules/composer/manifests/init.pp:53 at /etc/puppetlabs/code/environments/development/modules/composer/manifests/init.pp:53:3

i'm controlling what software is installed on my nodes.
If there is need in some basic packages i'm using my own sysadmin::base which has couple packages like git, wget, vim, rsync, ...
Installing them with ensure_packages($packages_list)
and it not interferes with modules which have explicit packages install for example ensure_packages(['git']) or 'wget'.

In your case I don't understand why you have to use ensure_packages() with ensure => installed
do it like so if you want

package{ 'wget':
  ensure => installed,
}

But of course i'm here to suggest you to use simple form ensure_packages(['wget'])

Probably you will agree with me that it looks like nonsense: many puppet users have wget installation in their own modules/manifests and why they should be distracted with some module from forge which is not directly related to wget. Users which are using puppet should be smart enough to fix wget package on their systems, and use ensure_packages() for some trivial cases in manifests

Metadata

Metadata

Assignees

Labels

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions