markt-de / puppet-acme

Centralized SSL certificate management using acme.sh and the ACME protocol
https://forge.puppet.com/markt/acme
Apache License 2.0
9 stars 17 forks source link

Duplicate declaration: Package[git] with ensure_packages #29

Closed philipfreude closed 4 years ago

philipfreude commented 4 years ago

Using ensure_packages('git') for puppetmaster setup creates a duplicate declaration error when the package 'git' is included in another module with something else than ensure_packages('git') or ensure => present.

A good explanation can be found in this issue for another module: https://github.com/willdurand/puppet-composer/issues/44

I propose changing the

ensure_packages('git')

to a

if !defined(Package['git']) {
      ensure_packages('git')
}

which will solve the issue.

philipfreude commented 4 years ago

see https://github.com/fraenki/puppet-acme/pull/30

fraenki commented 4 years ago

Fix will be available in the upcoming 2.1.0.