Skip to content

Commit b2d2ef8

Browse files
committed
Add deprecated parameters
1 parent 1e3a551 commit b2d2ef8

File tree

2 files changed

+19
-13
lines changed

2 files changed

+19
-13
lines changed

manifests/init.pp

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,26 +4,27 @@
44
# Manage the inclusion of the pg_repack class
55
# @param disable_maintenance [Boolean] true or false (Default: false)
66
# Disable or enable maintenance mode
7-
# @param manage_postgresql_settings [Boolean] true or false (Default: true)
8-
# Manage PostgreSQL settings
9-
# @param manage_table_settings [Boolean] true or false (Default: false)
10-
# Manage table settings
117
# @param install_dir [String] Directory to install module into (Default: "/opt/puppetlabs/pe_databases")
128
# @param scripts_dir [String] Directory to install scripts into (Default: "${install_dir}/scripts")
139
# @param facts_tables_repack_timer [String] The Systemd timer for the pg_repack job affecting the 'facts' tables
1410
# @param catalogs_tables_repack_timer [String]The Systemd timer for the pg_repack job affecting the 'catalog' tables
1511
# @param other_tables_repack_timer [String] The Systemd timer for the pg_repack job affecting the 'other' tables
16-
# @param reports_tables_repack_timer [String] The Systemd timer for the pg_repack job affecting the 'reports' tables
17-
# @param resource_events_tables_repack_timer [String] The Systemd timer for the pg_repack job affecting the 'resource_events' tables
1812
class pe_databases (
1913
Boolean $manage_database_maintenance = true,
2014
Boolean $disable_maintenance = false,
15+
Optional[Boolean] $manage_postgresql_settings = undef,
16+
Optional[Boolean] $manage_table_settings = undef,
2117
String[1] $install_dir = '/opt/puppetlabs/pe_databases',
2218
String[1] $scripts_dir = "${install_dir}/scripts",
2319
String[1] $facts_tables_repack_timer = 'Tue,Sat *-*-* 04:30:00',
24-
String[1] $catalogs_tables_repack_timer = 'Sun,Thu *-*-* 04:30:00',
25-
String[1] $other_tables_repack_timer = '*-*-20 05:30:00',
20+
Optional[String] $catalogs_tables_repack_timer = undef,
21+
Optional[String] $other_tables_repack_timer = undef,
2622
) {
23+
puppet_enterprise::deprecated_parameter{'pe_databases::manage_postgresql_settings': }
24+
puppet_enterprise::deprecated_parameter{'pe_databases::manage_table_settings': }
25+
puppet_enterprise::deprecated_parameter{'pe_databases::reports_tables_repack_timer': }
26+
puppet_enterprise::deprecated_parameter{'pe_databases::resource_events_tables_repack_timer': }
27+
2728
file { [$install_dir, $scripts_dir]:
2829
ensure => directory,
2930
mode => '0755',

manifests/pg_repack.pp

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,17 @@
1010
# @param catalogs_tables_repack_timer [String]The Systemd timer for the pg_repack job affecting the 'catalog' tables
1111
# @param other_tables_repack_timer [String] The Systemd timer for the pg_repack job affecting the 'other' tables
1212
class pe_databases::pg_repack (
13-
Boolean $disable_maintenance = false,
14-
Integer $jobs = $facts['processors']['count'] / 4,
15-
String[1] $facts_tables_repack_timer = $pe_databases::facts_tables_repack_timer,
16-
String[1] $catalogs_tables_repack_timer = $pe_databases::catalogs_tables_repack_timer,
17-
String[1] $other_tables_repack_timer = $pe_databases::other_tables_repack_timer,
13+
Boolean $disable_maintenance = false,
14+
Integer $jobs = $facts['processors']['count'] / 4,
15+
String[1] $facts_tables_repack_timer = $pe_databases::facts_tables_repack_timer,
16+
String[1] $catalogs_tables_repack_timer = $pe_databases::catalogs_tables_repack_timer,
17+
String[1] $other_tables_repack_timer = $pe_databases::other_tables_repack_timer,
18+
Optional[String] $reports_tables_repack_timer = undef,
19+
Optional[String] $resource_events_tables_repack_timer = undef,
1820
) {
21+
puppet_enterprise::deprecated_parameter{'pe_databases::pg_repack::reports_tables_repack_timer': }
22+
puppet_enterprise::deprecated_parameter{'pe_databases::pg_repack::resource_events_tables_repack_timer': }
23+
1924
$postgresql_version = $facts['pe_postgresql_info']['installed_server_version']
2025
$repack_executable = "/opt/puppetlabs/server/apps/postgresql/${postgresql_version}/bin/pg_repack"
2126

0 commit comments

Comments
 (0)