Skip to content

Commit

Permalink
PE-38801 Fixed formatting of rules in warning message
Browse files Browse the repository at this point in the history
  • Loading branch information
AaronShannon committed Oct 3, 2024
1 parent e83c741 commit 962c7b3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions plans/convert.pp
Original file line number Diff line number Diff line change
Expand Up @@ -261,8 +261,9 @@
# the existing groups are correct enough to function until the upgrade is
# performed.
if (versioncmp($pe_version, '2019.7.0') >= 0) {
out::message('WARNING: The following existing rules on the PE Infrastructure Agent group will be overwritten with default values:')
run_task('peadm::get_group_rules', $primary_target)
$rules = run_task('peadm::get_group_rules', $primary_target).first.value['_output']
$rules_formatted = stdlib::to_json_pretty(parsejson($rules))
out::message("WARNING: The following existing rules on the PE Infrastructure Agent group will be overwritten with default values:\n ${rules_formatted}")
apply($primary_target) {
class { 'peadm::setup::node_manager_yaml':
Expand Down
5 changes: 3 additions & 2 deletions plans/upgrade.pp
Original file line number Diff line number Diff line change
Expand Up @@ -326,8 +326,9 @@
default => $primary_postgresql_target.peadm::certname(),
}

out::message('WARNING: The following existing rules on the PE Infrastructure Agent group will be overwritten with default values:')
run_task('peadm::get_group_rules', $primary_target)
$rules = run_task('peadm::get_group_rules', $primary_target).first.value['_output']
$rules_formatted = stdlib::to_json_pretty(parsejson($rules))
out::message("WARNING: The following existing rules on the PE Infrastructure Agent group will be overwritten with default values:\n ${rules_formatted}")
apply($primary_target) {
class { 'peadm::setup::node_manager_yaml':
Expand Down

0 comments on commit 962c7b3

Please sign in to comment.