Repository navigation
Modernize for Puppet 8 - #4
Merged
Merged
Conversation
Set template-url to the internal pdk-templates repo (3.4.0.3) and ran a real "pdk update --force". template-ref is now tags/3.4.0.3-0-g8fb22fc. .sync.yml is unchanged (coverage_report true, minimum_code_coverage_percentage 100). Verification run: - pdk update --noop: No changes required - pdk validate: exit 0, no findings - pdk test unit: 57 examples, 0 failures, 100% resource coverage (was 183 on the old template; see note) Note: the example count dropped from 183 to 57 with the new template because the on_supported_os matrix resolves to fewer fact sets. The OS matrix in metadata.json is still stale and is updated separately.
- Require puppet >= 8.0.0 < 9.0.0 - Declare puppetlabs/stdlib >= 9.0.0 < 11.0.0 in dependencies - Support RedHat and Rocky 8-10, SLES 12/15, Ubuntu 20.04-24.04 and Debian 11/12; drop EOL RedHat, CentOS, Debian, Ubuntu - Simplify .fixtures.yml: unpinned public stdlib, drop the redundant module symlink (spec_helper adds it automatically)
- Use an .each loop with the splat operator instead of
create_resources(sysctl, ...)
- Use lookup('sysctl::base::values', Hash, 'hash', {}) instead of the
legacy hiera_hash()
- Behaviour is unchanged
Verified: pdk validate clean; pdk test unit: 165 examples,
0 failures, 100% resource coverage.
- Replace templates/sysctl.d-file.erb with a typed EPP template and call epp() from the sysctl define - Output is byte-identical: rendered old ERB and new EPP for 9 cases (undef/set value, string/array/multi-line/CRLF/empty comment); all compared equal with cmp - Add a spec for a multi-line string comment Verification: pdk validate clean; pdk test unit 166 examples, 0 failures, 100% resource coverage.
- Generate REFERENCE.md with puppet-strings; regenerated twice with no diff, 100.00% documented (0 undocumented) - Rewrite README in the afs layout with TOC, Setup, Usage, Reference, Limitations and Development sections - Keep the real usage examples, drop the hand-written parameter list - Remove the stale "Tested on RHEL 6 and 7" claim - OS list, Puppet and stdlib statements match metadata.json Ran pdk validate: passed. Ran pdk test unit: 166 examples, 0 failures, 100% resource coverage.
Puppet 7 is no longer supported, so remove its workflow. Bump actions/checkout from v2 to v5 in the Puppet 8 workflow.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Bring the module up to a current Puppet 8 / PDK baseline.
>= 8.0.0 < 9.0.0, stdlib>= 9.0.0 < 11.0.0Debian 11, 12 (drops EL5-7, CentOS and old Debian/Ubuntu releases)
create_resourceswith.eachandhiera_hashwithlookup(same hash merge behaviour for
sysctl::base::values)actions/checkoutto v5Breaking changes
Testing
pdk validate: cleanpdk test unit: 166 examples, 0 failurespdk update --noop: no changes required