Showing with 25 additions and 3 deletions.
  1. +11 −0 CHANGELOG.md
  2. +1 −1 metadata.json
  3. +1 −1 plans/convert.pp
  4. +11 −0 tasks/puppet_runonce.sh
  5. +1 −1 types/singletargetspec.pp
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# PEADM module

## 2.4.5
### Summary

Bugfix release

### Bugfixes

* Fix an issue in the convert plan incorrectly disallowing conversion of deployments newer than 2019.7.0.
* Fix a problem with the Peadm::SingleTargetSpec type alias.
* Fix peadm::puppet\_runonce to correctly return a failure if the Puppet agent run had resource failures.

## 2.4.4
### Summary

Expand Down
2 changes: 1 addition & 1 deletion metadata.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "puppetlabs-peadm",
"version": "2.4.4",
"version": "2.4.5",
"author": "puppetlabs",
"summary": "Bolt plans used to deploy an at-scale Puppet Enterprise architecture",
"license": "Apache-2.0",
Expand Down
2 changes: 1 addition & 1 deletion plans/convert.pp
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
$exts[peadm::oid('peadm_role')] or String($exts[peadm::oid('pp_role')]) =~ /pe_xl|peadm/
}

if (!$previously_configured_by_peadm and (versioncmp($pe_version, '2019.7.0') > 0)) {
if (!$previously_configured_by_peadm and ($pe_version =~ SemVerRange('< 2019.7.0'))) {
fail_plan(@("EOL"/L))
PE deployment cannot be converted! PE deployment must be a deployment \
created by pe_xl, by an older version of peadm, or be PE version \
Expand Down
11 changes: 11 additions & 0 deletions tasks/puppet_runonce.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,15 @@ echo
--no-usecacheonfailure \
--no-splay \
--no-use_cached_catalog \
--detailed-exitcodes \
$NOOP_FLAG

# Without --detailed-exitcodes, the `puppet agent` command will return 0 even
# if there are resource failures. Use --detailed-exitcodes but only exit
# non-zero if an error occurred. Changes (code 2) are not errors.
exitcode=$?
if [ $exitcode -eq 0 -o $exitcode -eq 2 ]; then
exit 0
else
exit $exitcode
fi
2 changes: 1 addition & 1 deletion types/singletargetspec.pp
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
type Peadm::SingleTargetSpec = Variant[
Pattern[/\A[^[:space:],]+\z/],
Target,
Array[Boltlib::SingleTargetSpec, 1, 1]
Array[Peadm::SingleTargetSpec, 1, 1]
]