You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Affected Puppet, Ruby, OS and module versions/distributions
Puppet: v4.8.2 client, 6.14 server
Ruby: 2.3.2
Distribution: Debian Stretch
Module version: 7.1.0
How to reproduce (e.g Puppet code you use)
When a php7.0-cli package is defined elsewhere, a duplicate definition is created. In our case, we have php7.0-cli and some others installed by ensure_packages() from stdlib, and used for some ordering, like so:
$packages = flatten([
$pkg_step1,
$pkg_step2,
])
ensure_packages($packages)
# Make sure the cgi package is installed before php so that the latter
# doesn't pull in libapache2-mod-php.
Package[$pkg_step1] -> Package[$pkg_step2]
What are you seeing
Duplicate resource definition
What behaviour did you expect instead
Packages to be installed with ensure_packages() to avoid conflicts where defined elsewhere.
Output log
Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Evaluation Error: Error while evaluating a Resource Statement, Duplicate declaration: Package[php7.0-cli] is already declared at (file: /etc/puppetlabs/code/environments/<redacted>/modules/<redacted path to own class>/php.pp, line: 73); cannot redeclare (file: /etc/puppetlabs/code/environments/<redacted>/modules_dist/php/manifests/packages.pp, line: 30) (file: /etc/puppetlabs/code/environments/<redacted>/modules_dist/php/manifests/packages.pp, line: 30, column: 5) on node <redacted>
Warning: Not using cache on failed catalog
Any additional information you'd like to impart
Should be an easy enough fix, so I'll get a PR in shortly.
The text was updated successfully, but these errors were encountered:
rjhenry
pushed a commit
to rjhenry/puppet-php
that referenced
this issue
May 29, 2020
Affected Puppet, Ruby, OS and module versions/distributions
How to reproduce (e.g Puppet code you use)
When a
php7.0-cli
package is defined elsewhere, a duplicate definition is created. In our case, we havephp7.0-cli
and some others installed byensure_packages()
fromstdlib
, and used for some ordering, like so:What are you seeing
Duplicate resource definition
What behaviour did you expect instead
Packages to be installed with
ensure_packages()
to avoid conflicts where defined elsewhere.Output log
Any additional information you'd like to impart
Should be an easy enough fix, so I'll get a PR in shortly.
The text was updated successfully, but these errors were encountered: