Skip to content
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

Merged
merged 2 commits into from
May 11, 2019

Conversation

Wiston999
Copy link

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

Copy link
Member

@Dan33l Dan33l left a 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.

@@ -3,7 +3,7 @@
class squid::install {

package{$::squid::package_name:
ensure => present,
ensure => $::squid::package_ensure,
Copy link
Member

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.

@@ -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,
Copy link
Member

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.*/]]

Copy link
Author

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.

@@ -38,6 +38,7 @@
$logformat = undef
$error_directory = undef
$err_page_stylesheet = undef
$package_ensure = present
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing quotes

@bastelfreak bastelfreak added the enhancement New feature or request label May 11, 2019
@bastelfreak
Copy link
Member

Hi @Wiston999, thanks for the PR!

@bastelfreak bastelfreak merged commit 5607d02 into voxpupuli:master May 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants