Skip to content

Commit e416c2b

Browse files
committed
Support PE 2021.0
1 parent 1c59877 commit e416c2b

File tree

6 files changed

+28
-25
lines changed

6 files changed

+28
-25
lines changed

Diff for: .gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,6 @@ bolt-debug.log
2929
.envrc
3030
/inventory.yaml
3131
.rerun.json
32+
.plan_cache.json
3233
*.tar.gz
33-
Puppetfile
34+
Puppetfile

Diff for: CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,10 @@
55

66
### Improvements
77

8+
- Support PE 2021.0
89
- Handle exit code 11 from replica upgrade task gracefully. Code 11 means "PuppetDB sync in progress but not yet complete".
910
- Further remediate the bug fixed in 2.4.2, by ensuring that all peadm-managed node groups preserve existing data or class parameters not explicitly being managed. This is accomplished by requiring a new version of WhatsARanjit-node\_manager, v0.7.4.
11+
- Switch dependency enumeration from in-project Puppetfile to bolt-project.yaml modules setting
1012

1113
## 2.4.5
1214
### Summary

Diff for: README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ The normal usage pattern for peadm is as follows.
4949

5050
### Requirements
5151

52-
* Puppet Enterprise 2019.8.1 or newer (tested with PE 2019.8.1)
53-
* Bolt 2.27.0 or newer (tested with Bolt 2.27.0)
52+
* Puppet Enterprise 2019.8.1 or newer (tested with PE 2021.0)
53+
* Bolt 2.27.0 or newer (tested with Bolt 3.0.1)
5454
* EL 7, EL 8, Ubuntu 18.04, or Ubuntu 20.04
5555
* Classifier Data enabled. This PE feature is enabled by default on new installs, but can be disabled by users if they remove the relevant configuration from their global hiera.yaml file. See the [PE docs](https://puppet.com/docs/pe/latest/config_console.html#task-5039) for more information.
5656

Diff for: functions/check_bolt_version.pp

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@
22
# Fails the calling plan if false, does nothing if true.
33
# Accepts a parameter for the $supported_bolt_version for unit testing purposes
44
function peadm::check_bolt_version(
5-
$supported_bolt_version = '>= 2.42.0 < 3.0.0'
5+
$supported_bolt_version = '>= 2.42.0 < 4.0.0'
66
) {
77
$supported = (peadm::bolt_version() =~ SemVerRange($supported_bolt_version))
88

99
unless $supported {
1010
fail(@("REASON"/L))
1111
This version of puppetlabs-peadm requires Bolt version ${supported_bolt_version}.
12-
12+
1313
You are using Bolt version ${peadm::bolt_version()}.
14-
14+
1515
Please make sure you have a compatible Bolt version and try again.
1616

1717
| REASON

Diff for: functions/validate_version.pp

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
function peadm::validate_version(
44
String $version,
55
) >> Boolean {
6-
$supported = ($version =~ SemVerRange('>= 2019.7.0 <= 2019.9.0'))
6+
$supported = ($version =~ SemVerRange('>= 2019.7.0 <= 2021.0.0'))
77

88
unless $supported {
99
fail(@("REASON"/L))
@@ -12,7 +12,7 @@ function peadm::validate_version(
1212
For PE versions older than 2019.7, please use version 1.x of the \
1313
puppetlabs-peadm module.
1414

15-
For PE versions newer than 2019.8, check to see if a new version of peadm \
15+
For PE versions newer than 2021.0, check to see if a new version of peadm \
1616
exists which supports that version of PE.
1717

1818
| REASON

Diff for: spec/functions/validate_version_spec.rb

+17-17
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,27 @@
22
require 'spec_helper'
33

44
describe 'peadm::validate_version' do
5-
it '2020.3.0' do
6-
is_expected.to run.with_params('2020.3.0').and_raise_error(Puppet::ParseError, /This\ version\ of\ the/)
7-
end
5+
context 'invalide PE versions' do
6+
it 'rejects PE versions that are too new' do
7+
is_expected.to run.with_params('2021.1.0').and_raise_error(Puppet::ParseError, /This\ version\ of\ the/)
8+
end
89

9-
it '2019.9.0' do
10-
is_expected.to run.with_params('2019.9.0').and_return(true)
10+
it 'rejects PE versions that are too old' do
11+
is_expected.to run.with_params('2018.1.9').and_raise_error(Puppet::ParseError, /This\ version\ of\ the/)
12+
end
1113
end
1214

13-
it '2019.8.4' do
14-
is_expected.to run.with_params('2019.8.4').and_return(true)
15-
end
15+
context 'valid PE versions' do
16+
it 'accepts the minimum supported version' do
17+
is_expected.to run.with_params('2019.7.0').and_return(true)
18+
end
1619

17-
it '2019.8.0' do
18-
is_expected.to run.with_params('2019.8.0').and_return(true)
19-
end
20-
21-
it '2019.7.1' do
22-
is_expected.to run.with_params('2019.7.1').and_return(true)
23-
end
20+
it 'accepts the newest supported version number' do
21+
is_expected.to run.with_params('2021.0.0').and_return(true)
22+
end
2423

25-
it '2018.1' do
26-
is_expected.to run.with_params('2018.1').and_raise_error(Puppet::ParseError, /This\ version\ of\ the/)
24+
it 'accepts a version in the middle' do
25+
is_expected.to run.with_params('2019.8.4').and_return(true)
26+
end
2727
end
2828
end

0 commit comments

Comments
 (0)