Skip to content

Commit 1409758

Browse files
authored
Merge branch 'main' into main
2 parents 7571612 + dfd9b30 commit 1409758

File tree

130 files changed

+2240
-600
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

130 files changed

+2240
-600
lines changed

Diff for: .devcontainer/README.md

+6-2
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,18 @@ https://github.com/microsoft/vscode-dev-containers/tree/v0.140.1/containers/pupp
1313

1414
// Set *default* container specific settings.json values on container create.
1515
"settings": {
16-
"terminal.integrated.shell.linux": "/bin/bash"
16+
"terminal.integrated.profiles.linux": {
17+
"bash": {
18+
"path": "bash",
19+
}
20+
}
1721
},
1822

1923
// Add the IDs of extensions you want installed when the container is created.
2024
"extensions": [
2125
"puppet.puppet-vscode",
2226
"rebornix.Ruby"
23-
]
27+
],
2428

2529
// Use 'forwardPorts' to make a list of ports inside the container available locally.
2630
"forwardPorts": [],

Diff for: .github/workflows/mend.yml

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: "mend"
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- "main"
7+
schedule:
8+
- cron: "0 0 * * *"
9+
workflow_dispatch:
10+
11+
jobs:
12+
13+
mend:
14+
uses: "puppetlabs/cat-github-actions/.github/workflows/mend_ruby.yml@main"
15+
secrets: "inherit"

Diff for: .github/workflows/nightly.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -200,5 +200,5 @@ jobs:
200200
repo_token: ${{ secrets.GITHUB_TOKEN }}
201201
slack_webhook_url: ${{ secrets.SLACK_WEBHOOK }}
202202
# Optional Input
203-
channel: '#team-ia-bots'
203+
channel: '#team-cat-bots'
204204
name: 'GABot'

Diff for: .github/workflows/spec.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,10 @@ jobs:
5454
buildevents step $TRACE_ID $STEP_ID $STEP_START 'Setup Environment'
5555
echo STEP_ID=Setup-Acceptance-Test-Matrix >> $GITHUB_ENV
5656
echo STEP_START=$(date +%s) >> $GITHUB_ENV
57-
# - name: Run Static & Syntax Tests
58-
# if: ${{ github.repository_owner == 'puppetlabs' }}
59-
# run: |
60-
# buildevents cmd $TRACE_ID $STEP_ID 'static_syntax_checks' -- bundle exec rake syntax lint metadata_lint check:symlinks check:git_ignore check:dot_underscore check:test_file rubocop
57+
- name: Run Static & Syntax Tests
58+
if: ${{ github.repository_owner == 'puppetlabs' }}
59+
run: |
60+
buildevents cmd $TRACE_ID $STEP_ID 'static_syntax_checks' -- bundle exec rake syntax lint metadata_lint check:symlinks check:git_ignore check:dot_underscore check:test_file rubocop
6161
6262
- name: Setup Spec Test Matrix
6363
id: get-matrix

Diff for: .github/workflows/stale.yml

-19
This file was deleted.

Diff for: .sync.yml

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ Gemfile:
1111
optional:
1212
":development":
1313
- gem: github_changelog_generator
14+
version: '= 1.15.2'
1415
spec/spec_helper.rb:
1516
mock_with: ":rspec"
1617
coverage_report: true

Diff for: CHANGELOG.md

+68-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,73 @@
22

33
All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org).
44

5+
## [v8.5.0](https://github.com/puppetlabs/puppetlabs-stdlib/tree/v8.5.0) (2022-10-13)
6+
7+
[Full Changelog](https://github.com/puppetlabs/puppetlabs-stdlib/compare/v8.4.0...v8.5.0)
8+
9+
### Added
10+
11+
- Add a Stdlib::CreateResources type [\#1267](https://github.com/puppetlabs/puppetlabs-stdlib/pull/1267) ([ekohl](https://github.com/ekohl))
12+
- pdksync - \(GH-cat-11\) Certify Support for Ubuntu 22.04 [\#1261](https://github.com/puppetlabs/puppetlabs-stdlib/pull/1261) ([david22swan](https://github.com/david22swan))
13+
- \(FEAT\) Add function parsepson [\#1259](https://github.com/puppetlabs/puppetlabs-stdlib/pull/1259) ([david22swan](https://github.com/david22swan))
14+
15+
### Fixed
16+
17+
- \(CONT-200\) Fix require relative paths [\#1275](https://github.com/puppetlabs/puppetlabs-stdlib/pull/1275) ([chelnak](https://github.com/chelnak))
18+
- pdksync - \(CONT-189\) Remove support for RedHat6 / OracleLinux6 / Scientific6 [\#1272](https://github.com/puppetlabs/puppetlabs-stdlib/pull/1272) ([david22swan](https://github.com/david22swan))
19+
- pdksync - \(CONT-130\) - Dropping Support for Debian 9 [\#1269](https://github.com/puppetlabs/puppetlabs-stdlib/pull/1269) ([jordanbreen28](https://github.com/jordanbreen28))
20+
- \(MAINT\) Drop support for AIX + Windows EOL OSs [\#1265](https://github.com/puppetlabs/puppetlabs-stdlib/pull/1265) ([jordanbreen28](https://github.com/jordanbreen28))
21+
- \(GH-1262\) Use 'require\_relative' to load stdlib due to lookup errors [\#1264](https://github.com/puppetlabs/puppetlabs-stdlib/pull/1264) ([david22swan](https://github.com/david22swan))
22+
- Switch parsejson\(\) from PSON to JSON parsing [\#1240](https://github.com/puppetlabs/puppetlabs-stdlib/pull/1240) ([seanmil](https://github.com/seanmil))
23+
24+
## [v8.4.0](https://github.com/puppetlabs/puppetlabs-stdlib/tree/v8.4.0) (2022-07-21)
25+
26+
[Full Changelog](https://github.com/puppetlabs/puppetlabs-stdlib/compare/v8.3.0...v8.4.0)
27+
28+
### Added
29+
30+
- deferrable epp function simplifying deferred templates [\#1253](https://github.com/puppetlabs/puppetlabs-stdlib/pull/1253) ([binford2k](https://github.com/binford2k))
31+
32+
## [v8.3.0](https://github.com/puppetlabs/puppetlabs-stdlib/tree/v8.3.0) (2022-07-11)
33+
34+
[Full Changelog](https://github.com/puppetlabs/puppetlabs-stdlib/compare/v8.2.0...v8.3.0)
35+
36+
### Added
37+
38+
- pdksync - \(GH-cat-12\) Add Support for Redhat 9 [\#1247](https://github.com/puppetlabs/puppetlabs-stdlib/pull/1247) ([david22swan](https://github.com/david22swan))
39+
- Convert `ensure_packages` to new API and refactor [\#1244](https://github.com/puppetlabs/puppetlabs-stdlib/pull/1244) ([alexjfisher](https://github.com/alexjfisher))
40+
41+
### Fixed
42+
43+
- \(MODULES-2892\) Handle missing file in file\_line [\#1251](https://github.com/puppetlabs/puppetlabs-stdlib/pull/1251) ([silug](https://github.com/silug))
44+
- Simplify stdlib::manage [\#1250](https://github.com/puppetlabs/puppetlabs-stdlib/pull/1250) ([jcpunk](https://github.com/jcpunk))
45+
- Unbreak `rake strings:generate:reference` [\#1239](https://github.com/puppetlabs/puppetlabs-stdlib/pull/1239) ([smortex](https://github.com/smortex))
46+
- loadjson: do not send http\_basic\_authentication if not needed [\#1208](https://github.com/puppetlabs/puppetlabs-stdlib/pull/1208) ([chaen](https://github.com/chaen))
47+
48+
## [v8.2.0](https://github.com/puppetlabs/puppetlabs-stdlib/tree/v8.2.0) (2022-05-16)
49+
50+
[Full Changelog](https://github.com/puppetlabs/puppetlabs-stdlib/compare/v8.1.0...v8.2.0)
51+
52+
### Added
53+
54+
- Add `xml_encode` function [\#1236](https://github.com/puppetlabs/puppetlabs-stdlib/pull/1236) ([alexjfisher](https://github.com/alexjfisher))
55+
- \(MODULES-4976\) Add windows escaping functions [\#1235](https://github.com/puppetlabs/puppetlabs-stdlib/pull/1235) ([smortex](https://github.com/smortex))
56+
- MODULES-11309 : convert a string to a resource [\#1233](https://github.com/puppetlabs/puppetlabs-stdlib/pull/1233) ([jcpunk](https://github.com/jcpunk))
57+
- pdksync - \(FM-8922\) - Add Support for Windows 2022 [\#1222](https://github.com/puppetlabs/puppetlabs-stdlib/pull/1222) ([david22swan](https://github.com/david22swan))
58+
- \(MODULES-11196\) Add support for AIX 7.2 [\#1220](https://github.com/puppetlabs/puppetlabs-stdlib/pull/1220) ([david22swan](https://github.com/david22swan))
59+
- pdksync - \(IAC-1753\) - Add Support for AlmaLinux 8 [\#1216](https://github.com/puppetlabs/puppetlabs-stdlib/pull/1216) ([david22swan](https://github.com/david22swan))
60+
61+
### Fixed
62+
63+
- Update load\_module\_metadata.rb to correct capitalisation in strings documentartion [\#1241](https://github.com/puppetlabs/puppetlabs-stdlib/pull/1241) ([davidsandilands](https://github.com/davidsandilands))
64+
- Modernize escape functions [\#1238](https://github.com/puppetlabs/puppetlabs-stdlib/pull/1238) ([smortex](https://github.com/smortex))
65+
- Convert data to Pcore before serialisation in to\_ruby/to\_python [\#1237](https://github.com/puppetlabs/puppetlabs-stdlib/pull/1237) ([smortex](https://github.com/smortex))
66+
- \(maint\) Update str2saltedpbkdf2.rb to use the correct salt length [\#1232](https://github.com/puppetlabs/puppetlabs-stdlib/pull/1232) ([AriaXLi](https://github.com/AriaXLi))
67+
- Fix `to_yaml` `options` parameter [\#1231](https://github.com/puppetlabs/puppetlabs-stdlib/pull/1231) ([alexjfisher](https://github.com/alexjfisher))
68+
- pdksync - \(GH-iac-334\) Remove Support for Ubuntu 14.04/16.04 [\#1224](https://github.com/puppetlabs/puppetlabs-stdlib/pull/1224) ([david22swan](https://github.com/david22swan))
69+
- pdksync - \(IAC-1787\) Remove Support for CentOS 6 [\#1219](https://github.com/puppetlabs/puppetlabs-stdlib/pull/1219) ([david22swan](https://github.com/david22swan))
70+
- Fix serialization of undef in to\_python\(\) [\#1205](https://github.com/puppetlabs/puppetlabs-stdlib/pull/1205) ([smortex](https://github.com/smortex))
71+
572
## [v8.1.0](https://github.com/puppetlabs/puppetlabs-stdlib/tree/v8.1.0) (2021-10-04)
673

774
[Full Changelog](https://github.com/puppetlabs/puppetlabs-stdlib/compare/v8.0.0...v8.1.0)
@@ -274,7 +341,7 @@ This is a major release which removes support for the Scientific 5 and Debian 7
274341
- Updated `merge()` with puppt language equivalent example.
275342
- Updated `min()` and `max()` with note that they are in puppet.
276343
- Updated `num2bool()` with information that Boolean can convert.
277-
- Updated `prefix()` function with equivalent operation in pupppet.
344+
- Updated `prefix()` function with equivalent operation in puppet.
278345
- Updated `range()` with information that Integer can be used.
279346
- Updated `reject()` with equivalent filter() call.
280347
- Added note to `reverse()` that the `reverse_each()` Puppet function does the same as it.

Diff for: Gemfile

+23-14
Original file line numberDiff line numberDiff line change
@@ -13,23 +13,32 @@ def location_for(place_or_version, fake_version = nil)
1313
end
1414
end
1515

16-
ruby_version_segments = Gem::Version.new(RUBY_VERSION.dup).segments
17-
minor_version = ruby_version_segments[0..1].join('.')
18-
1916
group :development do
20-
gem "json", '= 2.0.4', require: false if Gem::Requirement.create('~> 2.4.2').satisfied_by?(Gem::Version.new(RUBY_VERSION.dup))
21-
gem "json", '= 2.1.0', require: false if Gem::Requirement.create(['>= 2.5.0', '< 2.7.0']).satisfied_by?(Gem::Version.new(RUBY_VERSION.dup))
22-
gem "json", '= 2.3.0', require: false if Gem::Requirement.create(['>= 2.7.0', '< 2.8.0']).satisfied_by?(Gem::Version.new(RUBY_VERSION.dup))
23-
gem "puppet-module-posix-default-r#{minor_version}", '~> 1.0', require: false, platforms: [:ruby]
24-
gem "puppet-module-posix-dev-r#{minor_version}", '~> 1.0', require: false, platforms: [:ruby]
25-
gem "puppet-module-win-default-r#{minor_version}", '~> 1.0', require: false, platforms: [:mswin, :mingw, :x64_mingw]
26-
gem "puppet-module-win-dev-r#{minor_version}", '~> 1.0', require: false, platforms: [:mswin, :mingw, :x64_mingw]
27-
gem "voxpupuli-puppet-lint-plugins", '>= 3.0', require: false, platforms: [:ruby]
28-
gem "github_changelog_generator", require: false
17+
gem "json", '= 2.1.0', require: false if Gem::Requirement.create(['>= 2.5.0', '< 2.7.0']).satisfied_by?(Gem::Version.new(RUBY_VERSION.dup))
18+
gem "json", '= 2.3.0', require: false if Gem::Requirement.create(['>= 2.7.0', '< 3.0.0']).satisfied_by?(Gem::Version.new(RUBY_VERSION.dup))
19+
gem "json", '= 2.5.1', require: false if Gem::Requirement.create(['>= 3.0.0', '< 3.0.5']).satisfied_by?(Gem::Version.new(RUBY_VERSION.dup))
20+
gem "json", '= 2.6.1', require: false if Gem::Requirement.create(['>= 3.1.0', '< 3.1.3']).satisfied_by?(Gem::Version.new(RUBY_VERSION.dup))
21+
gem "json", '= 2.6.3', require: false if Gem::Requirement.create(['>= 3.2.0', '< 4.0.0']).satisfied_by?(Gem::Version.new(RUBY_VERSION.dup))
22+
gem "voxpupuli-puppet-lint-plugins", '~> 3.1', require: false
23+
gem "facterdb", '~> 1.18', require: false
24+
gem "metadata-json-lint", '>= 2.0.2', '< 4.0.0', require: false
25+
gem "puppetlabs_spec_helper", '>= 3.0.0', '< 5.0.0', require: false
26+
gem "rspec-puppet-facts", '~> 2.0', require: false
27+
gem "codecov", '~> 0.2', require: false
28+
gem "dependency_checker", '~> 0.2', require: false
29+
gem "parallel_tests", '~> 3.4', require: false
30+
gem "pry", '~> 0.10', require: false
31+
gem "simplecov-console", '~> 0.5', require: false
32+
gem "puppet-debugger", '~> 1.0', require: false
33+
gem "rubocop", '= 1.6.1', require: false
34+
gem "rubocop-performance", '= 1.9.1', require: false
35+
gem "rubocop-rspec", '= 2.0.1', require: false
36+
gem "rb-readline", '= 0.5.5', require: false, platforms: [:mswin, :mingw, :x64_mingw]
37+
gem "github_changelog_generator", '= 1.15.2', require: false
2938
end
3039
group :system_tests do
31-
gem "puppet-module-posix-system-r#{minor_version}", '~> 1.0', require: false, platforms: [:ruby]
32-
gem "puppet-module-win-system-r#{minor_version}", '~> 1.0', require: false, platforms: [:mswin, :mingw, :x64_mingw]
40+
gem "puppet_litmus", '< 1.0.0', require: false, platforms: [:ruby]
41+
gem "serverspec", '~> 2.41', require: false
3342
end
3443

3544
puppet_version = ENV['PUPPET_GEM_VERSION']

Diff for: HISTORY.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ This is a major release which removes support for the Scientific 5 and Debian 7
6060
- Updated `merge()` with puppt language equivalent example.
6161
- Updated `min()` and `max()` with note that they are in puppet.
6262
- Updated `num2bool()` with information that Boolean can convert.
63-
- Updated `prefix()` function with equivalent operation in pupppet.
63+
- Updated `prefix()` function with equivalent operation in puppet.
6464
- Updated `range()` with information that Integer can be used.
6565
- Updated `reject()` with equivalent filter() call.
6666
- Added note to `reverse()` that the `reverse_each()` Puppet function does the same as it.

Diff for: README.md

+17-2
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ If you are authoring a module that depends on stdlib, be sure to [specify depend
4040

4141
Most of stdlib's features are automatically loaded by Puppet. To use standardized run stages in Puppet, declare this class in your manifest with `include stdlib`.
4242

43-
When declared, stdlib declares all other classes in the module. The only other class currently included in the module is `stdlib::stages`.
43+
When declared, stdlib declares all other classes in the module. This currently consists of `stdlib::manage` and `stdlib::stages`.
4444

4545
The `stdlib::stages` class declares various run stages for deploying infrastructure, language runtimes, and application layers. The high level stages are (in order):
4646

@@ -62,6 +62,21 @@ node default {
6262
}
6363
```
6464

65+
The `stdlib::manage` class provides an interface for generating trivial resource declarations via the `create_resources` parameter. Depending on your usage, you may want to set `hiera`'s `lookup_options` for the `stdlib::manage::create_resources:` element.
66+
67+
```yaml
68+
---
69+
stdlib::manage::create_resources:
70+
file:
71+
/etc/somefile:
72+
ensure: file
73+
owner: root
74+
group: root
75+
package:
76+
badpackage:
77+
ensure: absent
78+
```
79+
6580
## Reference
6681
6782
For information on the classes and types, see the [REFERENCE.md](https://github.com/puppetlabs/puppetlabs-stdlib/blob/main/REFERENCE.md).
@@ -392,7 +407,7 @@ Valid values: An IPv4 address.
392407

393408
#### `Stdlib::IP::Address::V6`
394409

395-
Match any string consistenting of an IPv6 address in any of the documented formats in RFC 2373, with or without an address prefix.
410+
Match any string consisting of an IPv6 address in any of the documented formats in RFC 2373, with or without an address prefix.
396411

397412
Examples:
398413

0 commit comments

Comments
 (0)