-
-
Notifications
You must be signed in to change notification settings - Fork 94
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
Allow to set install_options for the Package resource #28
Conversation
Fixes the typo in both the README and the manifest documentation sections. Also automatically removed whitespace in README.de and the manifest file.
I like the simplicity of the module and I would prefer the solution with ensure_packages over adding another parameter for install options. However, as you already mentioned, we would need to check if resource defaults still work with ensure_pacakges, as we use them for windows to set chocolatey as package provider. On the other hand, even with ensure_packages Puppet will detect duplicates if the user defines a Package resource with the same name. The user would be required to use ensure_packages as well. But again, its better then nothing. On a side note, samba is being installed automatically when installing Icinga 2 on Debian? I'm just wondering I was not able to reproduce this. |
I could give it a try, but as I mention below, it won't solve the duplicate resource issue. However, as you rightly mention at the end, it's not icinga2 pulling in smbclient, so using
Yes, and even then, that doesn't solve duplication issues whenever the parameters passed differ from the original ones. So, assuming the icinga module would use I feel like this is either a real shortcoming in either Puppet or my understanding of it.
No, sorry, I just realized it's not icinga2 pulling in smbclient, but the standard plugins package. My bad.
|
This shouldn't create a duplicate entry. It would only create a duplicate if we use |
But it will create a duplicate entry nonetheless. I remember having read so in Puppet docs somewhere, but I can't find it right now. E.g. changing code in install.pp: + ensure_packages([ $package, ], { ensure => installed })
- package { $package:
- ensure => installed,
- } And adding another icinga2 package to e.g. my icinga2/server.pp manifest (with diverging defaults:) ensure_packages([
'icinga2',
'monitoring-plugins-standard',
'nagios-plugins-contrib',
'libmonitoring-plugin-perl',
], { install_options => ['--no-install-recommends']}) Will result in:
If I were to use the same signature both times, there would indeed not be any resource duplication. |
Yeah, there would also be no chance for Adding a parameter doesn't work as well. We support multiple operating systems, adding custom options would break the installation process. |
It's not (that) relevant anymore since we determined that the culprit is not icinga2 but the monitoring-plugins-standard package, but that I don't understand. |
@kwisatz Coming in a bit late, but I've got the following for my debian boxes:
This uses the |
Uh… thanks, that's a good idea. Guess I got kind of stuck in my narrow-minded approach. |
Again, this is more a basis for discussion than a real PR I would see merged in as-is.
The Package resource allows for "install_options" to be set, which is useful on Debian $::osfamily for instance to set
--no-install-recommends
(Specifically in order to avoid installing a vulnerable version of samba these days together with the icinga2 client.)Generally though, but I'm not sure Resource defaults have an impact on stdlib functions (scope?), maybe we should use ensure_packages() rather than Package directly in order to allow for people to declare some packages themselves without running into duplicate resource declaration issues?