-
-
Notifications
You must be signed in to change notification settings - Fork 314
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
How do you ensure unzip is installed? #356
Comments
I recommend using the "ensure_packages" function to install unzip using puppet: ensure_packages(['unzip']) This requires the puppet stdlib: This module uses the puppet-archive module to download zips and it is the users responsibility to install the needed utilities: |
Thank you for your reply!
Puppetfile:
So if I run puppet twice, it will work, because my-base is being run second. Is there a way to show a dependency between these modules? |
You can read more about this in the docs for puppet ordering dependencies: |
why isn't this simply part of the module? It's essentially a dependency and the module fails without it. |
It is presumptuous to automatically install a dependency in puppet; it is easy to conflict with an existing definition of `Package['unzip']. Also not everyone installs consul from zips (I use a system package). There is no "official" unzip puppet module to depend on, so we make it an optional dependency and leave it up to to user to install it as they see fit. Keep in mind we are just using |
Thank you for clarifying the fault lies with puppet-archive, I will open an issue. However I fundamentally disagree that expecting a module to work with a simple include is presumptuous. That should just be the baseline of a good module, especially as we can use ensure_packages as mentioned earlier and avoid conflicts. Bottom line is the default settings require a url pull and the use of unzip, and that has a chance of failing. If it's really an ""optional dependency" then it shouldn't be the default option. Simply flip the default to package and then you can be sure the "simplest route works". Seems like an easy tweak that avoids unnecessary complications. |
When puppet-consul is in a Puppetfile, the follow error occurs:
Error: Execution of 'unzip -o /opt/consul/archives/consul-0.7.5.zip' returned 1
Error: /Stage[main]/Consul::Install/Archive[/opt/consul/archives/consul-0.7.5.zip]/creates: change from archive not extracted to extracting in /opt/consul/archives/consul-0.7.5 to create /opt/consul/archives/consul-0.7.5/consul failed: Execution of 'unzip -o /opt/consul/archives/consul-0.7.5.zip' returned 1
How can we ensure unzip is installed before this, only using puppet? Don't we have to add unzip to metadata.json dependencies?
If I
apt-get install unzip
before running puppet it installs cleanly, but I am having trouble getting that into puppet.The text was updated successfully, but these errors were encountered: