Skip to content

Commit

Permalink
PE-38801 Warning text moved to applicable plans
Browse files Browse the repository at this point in the history
  • Loading branch information
AaronShannon committed Oct 2, 2024
1 parent b4574c7 commit e83c741
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
* [`download`](#download): Download a file using curl
* [`enable_replica`](#enable_replica): Execute the enable replica puppet command
* [`filesize`](#filesize): Return the size of a file in bytes
* [`get_group_rules`](#get_group_rules): Run on a PE primary node to return the rules currently applied to the PE Infrastructure Agent group, along with a warning that they will be o
* [`get_group_rules`](#get_group_rules): Run on a PE primary node to return the rules currently applied to the PE Infrastructure Agent group
* [`get_peadm_config`](#get_peadm_config): Run on a PE primary node to return the currently configured PEAdm parameters
* [`get_psql_version`](#get_psql_version): Run on a PE PSQL node to return the major version of the PSQL server currently installed
* [`infrastatus`](#infrastatus): Runs puppet infra status and returns the output
Expand Down Expand Up @@ -1188,7 +1188,7 @@ Path to the file to return the size of

### <a name="get_group_rules"></a>`get_group_rules`

Run on a PE primary node to return the rules currently applied to the PE Infrastructure Agent group, along with a warning that they will be overwritten
Run on a PE primary node to return the rules currently applied to the PE Infrastructure Agent group

**Supports noop?** false

Expand Down
1 change: 1 addition & 0 deletions plans/convert.pp
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,7 @@
# 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)

apply($primary_target) {
Expand Down
1 change: 1 addition & 0 deletions plans/upgrade.pp
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,7 @@
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)

apply($primary_target) {
Expand Down
2 changes: 1 addition & 1 deletion tasks/get_group_rules.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"description": "Run on a PE primary node to return the rules currently applied to the PE Infrastructure Agent group, along with a warning that they will be overwritten",
"description": "Run on a PE primary node to return the rules currently applied to the PE Infrastructure Agent group",
"parameters": { },
"input_method": "stdin"
}
1 change: 0 additions & 1 deletion tasks/get_group_rules.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ class GetInfrastructureAgentGroupRules
def execute!
infrastructure_agent_group = groups.find { |obj| obj['name'] == 'PE Infrastructure Agent' }
if infrastructure_agent_group
puts 'WARNING: The following existing rules on the PE Infrastructure Agent group will be overwritten with default values:'
puts JSON.pretty_generate(infrastructure_agent_group['rule'])
else
puts JSON.pretty_generate({ 'error' => 'PE Infrastructure Agent group does not exist' })
Expand Down

0 comments on commit e83c741

Please sign in to comment.