diff --git a/REFERENCE.md b/REFERENCE.md index 52683121..7aef694b 100644 --- a/REFERENCE.md +++ b/REFERENCE.md @@ -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 @@ -1188,7 +1188,7 @@ Path to the file to return the size of ### `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 diff --git a/plans/convert.pp b/plans/convert.pp index 3c5a15a7..724e87d3 100644 --- a/plans/convert.pp +++ b/plans/convert.pp @@ -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) { diff --git a/plans/upgrade.pp b/plans/upgrade.pp index c201dbb5..f254aafd 100644 --- a/plans/upgrade.pp +++ b/plans/upgrade.pp @@ -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) { diff --git a/tasks/get_group_rules.json b/tasks/get_group_rules.json index b9034bc4..994d8683 100644 --- a/tasks/get_group_rules.json +++ b/tasks/get_group_rules.json @@ -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" } diff --git a/tasks/get_group_rules.rb b/tasks/get_group_rules.rb index 9aa9eec4..a4f675fa 100755 --- a/tasks/get_group_rules.rb +++ b/tasks/get_group_rules.rb @@ -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' })