-
Notifications
You must be signed in to change notification settings - Fork 580
pdksync - (Maint) PDK Update #1234
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
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 |
|---|---|---|
| @@ -1,30 +1,30 @@ | ||
| # @summary function to cast ensure parameter to resource specific value | ||
| function stdlib::ensure( | ||
| Variant[Boolean, Enum['present', 'absent']] $ensure, | ||
| Enum['directory', 'link', 'mounted', 'service', 'file', 'package'] $resource, | ||
| Variant[Boolean, Enum['present', 'absent']] $ensure, | ||
| Enum['directory', 'link', 'mounted', 'service', 'file', 'package'] $resource, | ||
| ) >> String { | ||
| $_ensure = $ensure ? { | ||
| Boolean => $ensure.bool2str('present', 'absent'), | ||
| default => $ensure, | ||
| $_ensure = $ensure ? { | ||
| Boolean => $ensure.bool2str('present', 'absent'), | ||
| default => $ensure, | ||
| } | ||
| case $resource { | ||
| 'package': { | ||
| $_ensure ? { | ||
| 'present' => 'installed', | ||
| default => 'absent', | ||
| } | ||
| } | ||
| case $resource { | ||
| 'package': { | ||
| $_ensure ? { | ||
| 'present' => 'installed', | ||
| default => 'absent', | ||
| } | ||
| } | ||
| 'service': { | ||
| $_ensure ? { | ||
| 'present' => 'running', | ||
| default => 'stopped', | ||
| } | ||
| } | ||
| default: { | ||
| $_ensure ? { | ||
| 'present' => $resource, | ||
| default => $_ensure, | ||
| } | ||
| } | ||
| 'service': { | ||
| $_ensure ? { | ||
| 'present' => 'running', | ||
| default => 'stopped', | ||
| } | ||
| } | ||
| default: { | ||
| $_ensure ? { | ||
| 'present' => $resource, | ||
| default => $_ensure, | ||
| } | ||
| } | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -115,5 +115,5 @@ | |
| "description": "Standard Library for Puppet Modules", | ||
| "pdk-version": "2.3.0", | ||
|
Contributor
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. isn't pdk-version supposed to be 2.4.0?
Member
Author
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. ah, the version updated in between the original commit and when I added the fixes and exclusions. Since this one required no exclusions a second pdksync wasn't run
Member
Author
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. This is fine to merge. |
||
| "template-url": "https://github.com/puppetlabs/pdk-templates#main", | ||
| "template-ref": "heads/main-0-gf3911d3" | ||
| "template-ref": "heads/main-0-g806810b" | ||
| } | ||
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 don't really understand why this is so complex. It can be this easy:
I also submitted a PR for this in puppetlabs/pdk-templates#441 but it looks like this is lost somehow?