Skip to content

Commit ffa4d75

Browse files
Remove String datatype from parameters using Stdlib::Absolutepath
1 parent ffcdc07 commit ffa4d75

12 files changed

+25
-25
lines changed

manifests/globals.pp

+6-6
Original file line numberDiff line numberDiff line change
@@ -122,13 +122,13 @@
122122

123123
Optional[String[1]] $validcon_script_path = undef,
124124

125-
Optional[Variant[String[1], Stdlib::Absolutepath]] $initdb_path = undef,
126-
Optional[Variant[String[1], Stdlib::Absolutepath]] $psql_path = undef,
127-
Optional[Variant[String[1], Stdlib::Absolutepath]] $pg_hba_conf_path = undef,
128-
Optional[Variant[String[1], Stdlib::Absolutepath]] $pg_ident_conf_path = undef,
129-
Optional[Variant[String[1], Stdlib::Absolutepath]] $postgresql_conf_path = undef,
125+
Optional[Stdlib::Absolutepath] $initdb_path = undef,
126+
Optional[Stdlib::Absolutepath] $psql_path = undef,
127+
Optional[Stdlib::Absolutepath] $pg_hba_conf_path = undef,
128+
Optional[Stdlib::Absolutepath] $pg_ident_conf_path = undef,
129+
Optional[Stdlib::Absolutepath] $postgresql_conf_path = undef,
130130
Optional[Stdlib::Filemode] $postgresql_conf_mode = undef,
131-
Optional[Variant[String[1], Stdlib::Absolutepath]] $recovery_conf_path = undef,
131+
Optional[Stdlib::Absolutepath] $recovery_conf_path = undef,
132132
Hash $default_connect_settings = {},
133133

134134
Optional[Boolean] $pg_hba_conf_defaults = undef,

manifests/server.pp

+6-6
Original file line numberDiff line numberDiff line change
@@ -138,13 +138,13 @@
138138
Array[String[1]] $ipv4acls = $postgresql::params::ipv4acls,
139139
Array[String[1]] $ipv6acls = $postgresql::params::ipv6acls,
140140

141-
Variant[String[1], Stdlib::Absolutepath] $initdb_path = $postgresql::params::initdb_path,
142-
Variant[String[1], Stdlib::Absolutepath] $psql_path = $postgresql::params::psql_path,
143-
Variant[String[1], Stdlib::Absolutepath] $pg_hba_conf_path = $postgresql::params::pg_hba_conf_path,
144-
Variant[String[1], Stdlib::Absolutepath] $pg_ident_conf_path = $postgresql::params::pg_ident_conf_path,
145-
Variant[String[1], Stdlib::Absolutepath] $postgresql_conf_path = $postgresql::params::postgresql_conf_path,
141+
Stdlib::Absolutepath $initdb_path = $postgresql::params::initdb_path,
142+
Stdlib::Absolutepath $psql_path = $postgresql::params::psql_path,
143+
Stdlib::Absolutepath $pg_hba_conf_path = $postgresql::params::pg_hba_conf_path,
144+
Stdlib::Absolutepath $pg_ident_conf_path = $postgresql::params::pg_ident_conf_path,
145+
Stdlib::Absolutepath $postgresql_conf_path = $postgresql::params::postgresql_conf_path,
146146
Optional[Stdlib::Filemode] $postgresql_conf_mode = $postgresql::params::postgresql_conf_mode,
147-
Variant[String[1], Stdlib::Absolutepath] $recovery_conf_path = $postgresql::params::recovery_conf_path,
147+
Stdlib::Absolutepath $recovery_conf_path = $postgresql::params::recovery_conf_path,
148148

149149
String[1] $datadir = $postgresql::params::datadir,
150150
Optional[String[1]] $xlogdir = $postgresql::params::xlogdir,

manifests/server/default_privileges.pp

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
Hash $connect_settings = $postgresql::server::default_connect_settings,
3333
Enum['present', 'absent'] $ensure = 'present',
3434
String $group = $postgresql::server::group,
35-
Variant[String[1], Stdlib::Absolutepath] $psql_path = $postgresql::server::psql_path,
35+
Stdlib::Absolutepath $psql_path = $postgresql::server::psql_path,
3636
Optional[String] $target_role = undef,
3737
) {
3838
# If possible use the version of the remote database, otherwise

manifests/server/grant.pp

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
Hash $connect_settings = $postgresql::server::default_connect_settings,
4747
Enum['present', 'absent'] $ensure = 'present',
4848
String $group = $postgresql::server::group,
49-
Variant[String[1], Stdlib::Absolutepath] $psql_path = $postgresql::server::psql_path,
49+
Stdlib::Absolutepath $psql_path = $postgresql::server::psql_path,
5050
) {
5151
case $ensure {
5252
default: {

manifests/server/instance/config.pp

+4-4
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,11 @@
5151
Stdlib::Port $port = $postgresql::server::port,
5252
Array[String[1]] $ipv4acls = $postgresql::server::ipv4acls,
5353
Array[String[1]] $ipv6acls = $postgresql::server::ipv6acls,
54-
Variant[String[1], Stdlib::Absolutepath] $pg_hba_conf_path = $postgresql::server::pg_hba_conf_path,
55-
Variant[String[1], Stdlib::Absolutepath] $pg_ident_conf_path = $postgresql::server::pg_ident_conf_path,
56-
Variant[String[1], Stdlib::Absolutepath] $postgresql_conf_path = $postgresql::server::postgresql_conf_path,
54+
Stdlib::Absolutepath $pg_hba_conf_path = $postgresql::server::pg_hba_conf_path,
55+
Stdlib::Absolutepath $pg_ident_conf_path = $postgresql::server::pg_ident_conf_path,
56+
Stdlib::Absolutepath $postgresql_conf_path = $postgresql::server::postgresql_conf_path,
5757
Optional[Stdlib::Filemode] $postgresql_conf_mode = $postgresql::server::postgresql_conf_mode,
58-
Variant[String[1], Stdlib::Absolutepath] $recovery_conf_path = $postgresql::server::recovery_conf_path,
58+
Stdlib::Absolutepath $recovery_conf_path = $postgresql::server::recovery_conf_path,
5959
Boolean $pg_hba_conf_defaults = $postgresql::server::pg_hba_conf_defaults,
6060
String[1] $user = $postgresql::server::user,
6161
String[1] $group = $postgresql::server::group,

manifests/server/instance/initdb.pp

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
String[1] $datadir = $postgresql::server::datadir,
3333
Optional[String[1]] $encoding = $postgresql::server::encoding,
3434
String[1] $group = $postgresql::server::group,
35-
Variant[String[1], Stdlib::Absolutepath] $initdb_path = $postgresql::server::initdb_path,
35+
Stdlib::Absolutepath $initdb_path = $postgresql::server::initdb_path,
3636
Optional[String[1]] $lc_messages = $postgresql::server::lc_messages,
3737
Optional[String[1]] $locale = $postgresql::server::locale,
3838
Optional[String[1]] $logdir = $postgresql::server::logdir,

manifests/server/instance/late_initdb.pp

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
Optional[String[1]] $encoding = $postgresql::server::encoding,
1616
String[1] $user = $postgresql::server::user,
1717
String[1] $group = $postgresql::server::group,
18-
Variant[String[1], Stdlib::Absolutepath] $psql_path = $postgresql::server::psql_path,
18+
Stdlib::Absolutepath $psql_path = $postgresql::server::psql_path,
1919
Stdlib::Port $port = $postgresql::server::port,
2020
String[1] $module_workdir = $postgresql::server::module_workdir,
2121
) {

manifests/server/instance/passwd.pp

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
define postgresql::server::instance::passwd (
1717
String[1] $user = $postgresql::server::user,
1818
String[1] $group = $postgresql::server::group,
19-
Variant[String[1], Stdlib::Absolutepath] $psql_path = $postgresql::server::psql_path,
19+
Stdlib::Absolutepath $psql_path = $postgresql::server::psql_path,
2020
Stdlib::Port $port = $postgresql::server::port,
2121
String[1] $database = $postgresql::server::default_database,
2222
String[1] $module_workdir = $postgresql::server::module_workdir,

manifests/server/instance/service.pp

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
String[1] $user = $postgresql::server::user,
2828
Stdlib::Port $port = $postgresql::server::port,
2929
String[1] $default_database = $postgresql::server::default_database,
30-
Variant[String[1], Stdlib::Absolutepath] $psql_path = $postgresql::server::psql_path,
30+
Stdlib::Absolutepath $psql_path = $postgresql::server::psql_path,
3131
Hash $connect_settings = $postgresql::server::default_connect_settings,
3232
) {
3333
anchor { "postgresql::server::service::begin::${name}": }

manifests/server/pg_ident_rule.pp

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
# Needed for testing primarily, support for multiple files is not really
2121
# working.
22-
Variant[String[1], Stdlib::Absolutepath] $target = $postgresql::server::pg_ident_conf_path
22+
Stdlib::Absolutepath $target = $postgresql::server::pg_ident_conf_path
2323
) {
2424
if $postgresql::server::manage_pg_ident_conf == false {
2525
fail('postgresql::server::manage_pg_ident_conf has been disabled, so this resource is now unused and redundant, either enable that option or remove this resource from your manifests') # lint:ignore:140chars

manifests/server/recovery.pp

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
Optional[String[1]] $primary_slot_name = undef,
4747
Optional[String[1]] $trigger_file = undef,
4848
Optional[Integer] $recovery_min_apply_delay = undef,
49-
Variant[String[1], Stdlib::Absolutepath] $target = $postgresql::server::recovery_conf_path
49+
Stdlib::Absolutepath $target = $postgresql::server::recovery_conf_path
5050
) {
5151
if $postgresql::server::manage_recovery_conf == false {
5252
fail('postgresql::server::manage_recovery_conf has been disabled, so this resource is now unused and redundant, either enable that option or remove this resource from your manifests') # lint:ignore:140chars

manifests/server/role.pp

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
Hash $connect_settings = $postgresql::server::default_connect_settings,
4040
String[1] $psql_user = $postgresql::server::user,
4141
String[1] $psql_group = $postgresql::server::group,
42-
Variant[String[1], Stdlib::Absolutepath] $psql_path = $postgresql::server::psql_path,
42+
Stdlib::Absolutepath $psql_path = $postgresql::server::psql_path,
4343
String[1] $module_workdir = $postgresql::server::module_workdir,
4444
Enum['present', 'absent'] $ensure = 'present',
4545
Optional[Enum['md5', 'scram-sha-256']] $hash = undef,

0 commit comments

Comments
 (0)