-
Notifications
You must be signed in to change notification settings - Fork 18
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: Package[wget] is already declared #21
Comments
Hi, It's strange that only 'wget' package raises an error - it is not only one in the common Package list. |
Yes. I did a grep of common puppet modules I use ..
I wonder what the best practise is for avoiding dependency redeclaration errors in puppet? (Addendum: i verified that the "if" line above does actually work) |
Yeah, I found a similar answer - http://stackoverflow.com/questions/15266347/puppet-test-if-a-package-already-defined |
I fix this issue in last commit. |
I pulled master, but don't see a fix. |
Ok, yes I have that in master, but I had been looking for something like "! defined" Duplicate declaration: Package[wget] is already declared in file /mymodule/manifests/init.pp:110; cannot redeclare at /etc/puppet/environments/production/modules/scaleio/manifests/common_server.pp:12 Ah, it is in puppetlabs-stdlib. It would be useful to explain your fix :-) So a fix of the fix: if "ensure_resource('package', ['libaio', 'numactl', 'wget'], {'ensure' => 'installed'})" is replaced with "ensure_packages(['libaio', 'numactl', 'wget'], {'ensure' => 'present'})" it works fine (for me). |
Is all ok now? :) |
there are no changes on master git log -1 |
This commit changes behavior in 'wget' definition with ensure_resource. |
It does not, see 4 messages higher. I had expected that you commit another fix this morning, e.g. with ensure_packages |
hm, but can you check why ensure_resource doesn't work? |
LUD-1096 Fix for missing parameters in manifests
HI,
I have wget already define in a base common class that is applied to all servers, so when doing "class { 'scaleio::sds_server': }" one gets:
scaleio::sds_server: Duplicate declaration: Package[wget] is already declared
Should such a common base package really be defined as a dependency? I understand why one does it, but unfortunately puppet does not allow several packages to have the same dependency.
(testing on Ubuntu 16.04 from master)
The text was updated successfully, but these errors were encountered: