-
-
Notifications
You must be signed in to change notification settings - Fork 313
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
Install unzips conditionally #185
Conversation
A fix for the following issue we have encountered Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Duplicate declaration: Package[unzip] is already declared; cannot redeclare at /etc/puppet/modules/consul/manifests/install.pp:19
Yea, puppet and parse order dependent code kinda sucks. I'm guessing you have a package { 'unzip': } somewhere else? (that isn't using ensure_packages) Looks like there is some trailing whitespace, can you fix the tests? |
I don't have enough ruby/puppet knowledge to fix that failing spec. Any advice on how to proceed? |
In general: We tried to ensure that unzip comes before we try to unzip the web file, but it looks like it looks like your code introduced a bug: Be sure that unzip comes before the normal consul.zip and consul_web |
@@ -16,7 +16,9 @@ | |||
case $consul::install_method { | |||
'url': { | |||
if $::operatingsystem != 'darwin' { | |||
ensure_packages(['unzip'], { 'before' => Staging::File['consul.zip'] }) | |||
if ! defined ( Package['unzip'] ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you also please remove these additional white spaces?
Something like this is preferable: if !defined(Package['unzip']) {
Closing as we are no longer managing the zip package. |
A fix for the following issue we have encountered