Skip to content

Conversation

@chrisongthb
Copy link

@chrisongthb chrisongthb commented Nov 27, 2025

Summary

Currently it is not possible to skip package installation.

Additional Context

This MR adds param $package_manage, which lets the user decide on package mgmt.

Related Issues (if any)

Currently none, but I can file an issue, if wanted...

Checklist

  • 🟢 Spec tests.
  • 🟢 Acceptance tests.
  • Manually verified. (For example puppet apply)

@chrisongthb chrisongthb requested review from a team and bastelfreak as code owners November 27, 2025 12:33
class haproxy (
Variant[Enum['present', 'absent', 'purged', 'disabled', 'installed', 'latest'], String[1]] $package_ensure = 'present',
String $package_name = $haproxy::params::package_name,
Optional[String] $package_name = $haproxy::params::package_name,
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think this won't work. $haproxy::params::package_name will always provide a value. Even if you switch the datatype and pass in undef, puppet will get the default from the params.pp class.


Also I don't think setting the name to undef is the correct way to make the package installation optional. The better approach would be a new parameter, like $manage_package.

Copy link
Author

Choose a reason for hiding this comment

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

@bastelfreak - Thx for the review! I added $package_manage and changed PR summary & description. Can you pls. have another look?

@chrisongthb chrisongthb marked this pull request as draft November 27, 2025 14:17
@chrisongthb chrisongthb force-pushed the chrisongthb-package-name-optional branch from e56da54 to b0c524c Compare November 28, 2025 09:06
@chrisongthb chrisongthb changed the title Change package_name to optional in haproxy class to skip package mgmt Add param package_manage Nov 28, 2025
@chrisongthb chrisongthb marked this pull request as ready for review November 28, 2025 09:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants