-
Notifications
You must be signed in to change notification settings - Fork 136
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
(#236) Enable python module stream on EL8 #255
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,12 +3,23 @@ | |
# @param configure_epel A feature flag to include the 'epel' class and depend on it for package installation. | ||
# @param package_ensure The value passed to `ensure` when installing the client package. | ||
# @param package_name Name of package to use when installing the client package. | ||
# @param dnfmodule_version The yum module stream version to enable on EL8 and greater variants using the `package` method with the `dnfmodule` provider. | ||
# | ||
class letsencrypt::install ( | ||
Boolean $configure_epel = $letsencrypt::configure_epel, | ||
String $package_name = $letsencrypt::package_name, | ||
String $package_ensure = $letsencrypt::package_ensure, | ||
String[1] $dnfmodule_version = $letsencrypt::dnfmodule_version, | ||
) { | ||
if ($facts['os']['family'] == 'RedHat' and $facts['os']['release']['major'] >= '8') { | ||
package { 'enable python module stream': | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It surprises me this is needed since they are all default modules which AFAIK means they are automatically enabled if needed. If this is needed, it needs a There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Correct, I spun up a fresh AlmaLinux 8 vagrant box to test. Each of those streams are set to So this remediates errors in that scenario by ensuring that the stream is enabled first. To me it seems similar to ensuring that the epel repo (with There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No, I think that's a fair point that I hadn't considered yet. I do think it can make sense to introduce a class parameter I also wonder if this comparison works well. For example, you can break Fedora support where AFAIK certbot is not built modular. And I'm hesitant to compare strings as if they were versions. Is |
||
name => $dnfmodule_version, | ||
enable_only => true, | ||
provider => 'dnfmodule', | ||
ekohl marked this conversation as resolved.
Show resolved
Hide resolved
|
||
before => Package['letsencrypt'], | ||
} | ||
} | ||
|
||
package { 'letsencrypt': | ||
ensure => $package_ensure, | ||
name => $package_name, | ||
|
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.
You can't set this to
python36
since it's only valid for EL8 but it's invalid for anything else. It would be best to create an 8.yaml here withpython36
and then set it to~
in common.yaml. Then change it to