-
-
Notifications
You must be signed in to change notification settings - Fork 54
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
Control package status and version #126
Conversation
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.
@Wiston999 thank you for the PR.
I added son inline comments.
manifests/install.pp
Outdated
@@ -3,7 +3,7 @@ | |||
class squid::install { | |||
|
|||
package{$::squid::package_name: | |||
ensure => present, | |||
ensure => $::squid::package_ensure, |
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.
Leading colons are not required anymore now.
manifests/init.pp
Outdated
@@ -10,6 +10,7 @@ | |||
String $ensure_service = $squid::params::ensure_service, | |||
Pattern[/\d+ KB/] $maximum_object_size_in_memory = $squid::params::maximum_object_size_in_memory, | |||
String $package_name = $squid::params::package_name, | |||
String $package_ensure = $squid::params::package_ensure, |
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.
more accurate Variant[Enum['present','latest'], Pattern[/^\d.*/]]
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.
I've created a custom type to cover all enum cases (present, latest, absent and purged) and also the Pattern case.
manifests/params.pp
Outdated
@@ -38,6 +38,7 @@ | |||
$logformat = undef | |||
$error_directory = undef | |||
$err_page_stylesheet = undef | |||
$package_ensure = present |
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.
Missing quotes
Hi @Wiston999, thanks for the PR! |
Pull Request (PR) description
Parametrize package ensure value. This lets one install an specific version of the squid package. It also lets absentize or purge the package.
This Pull Request (PR) fixes the following issues