Skip to content

Commit 69e6d4e

Browse files
Formatting and Refactoring Changes to Vars
1 parent af7068b commit 69e6d4e

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

manifests/pg_repack.pp

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,23 +8,24 @@
88
# @param activity_tables [Array] Array of 'activity' tables to repack
99
# @param disable_maintenance [Boolean] true or false (Default: false)
1010
# Disable or enable maintenance mode
11+
# @param repack_log_level [Enum] Desired output level of logs
12+
# @param enable_echo [Boolean] true or false (Default: true)
13+
# Enabling echo output in logs
1114
# @param jobs [Integer] How many jobs to run in parallel
1215
# @param facts_tables_repack_timer [String] The Systemd timer for the pg_repack job affecting the 'facts' tables
1316
# @param catalogs_tables_repack_timer [String]The Systemd timer for the pg_repack job affecting the 'catalog' tables
1417
# @param other_tables_repack_timer [String] The Systemd timer for the pg_repack job affecting the 'other' tables
1518
# @param activity_tables_repack_timer [String] The Systemd timer for the pg_repack job affecting the 'activity' tables
1619
# @param reports_tables_repack_timer [String] Deprecated Parameter will be removed in future releases
1720
# @param resource_events_tables_repack_timer [String] Deprecated Parameter will be removed in future releases
18-
# @param repack_run_level
19-
# @param enable_echo
2021
class pe_databases::pg_repack (
2122
# Provided by module data
2223
Array $fact_tables,
2324
Array $catalog_tables,
2425
Array $other_tables,
2526
Array $activity_tables,
2627
Boolean $disable_maintenance = false,
27-
Enum['INFO','NOTICE','WARNING', 'ERROR', 'LOG', 'FATAL','PANIC','DEBUG'] $repack_run_level='DEBUG',
28+
Enum['INFO','NOTICE','WARNING','ERROR','LOG','FATAL','PANIC','DEBUG'] $repack_log_level='DEBUG',
2829
Boolean $enable_echo = true,
2930
Integer $jobs = $facts['processors']['count'] / 4,
3031
String[1] $facts_tables_repack_timer = $pe_databases::facts_tables_repack_timer,
@@ -40,14 +41,11 @@
4041
$postgresql_version = $facts['pe_postgresql_info']['installed_server_version']
4142
$repack_executable = "/opt/puppetlabs/server/apps/postgresql/${postgresql_version}/bin/pg_repack"
4243

43-
#Add conditionals,
44-
#If echo enabled = true run WITH
4544
if $enable_echo {
4645
$repack_cmd = "${repack_executable} --jobs ${jobs} --elevel ${repack_run_level} --echo"
4746
} else {
4847
$repack_cmd = "${repack_executable} --jobs ${jobs} --elevel ${repack_run_level}"
4948
}
50-
#else echo ommited - run without echo
5149

5250
pe_databases::collect { 'facts':
5351
disable_maintenance => $disable_maintenance,

0 commit comments

Comments
 (0)