Skip to content

Commit c8151ea

Browse files
authored
Merge pull request #1499 from SimonHoenscheid/resonable_datatypes_for_paths_and_directories
set datatype for directories to Stdlib::Absolutepath
2 parents 1dadd63 + f43f4b8 commit c8151ea

File tree

6 files changed

+18
-18
lines changed

6 files changed

+18
-18
lines changed

manifests/globals.pp

+6-6
Original file line numberDiff line numberDiff line change
@@ -133,11 +133,11 @@
133133

134134
Optional[Boolean] $pg_hba_conf_defaults = undef,
135135

136-
Optional[String[1]] $datadir = undef,
137-
Optional[String[1]] $confdir = undef,
138-
Optional[String[1]] $bindir = undef,
139-
Optional[String[1]] $xlogdir = undef,
140-
Optional[String[1]] $logdir = undef,
136+
Optional[Stdlib::Absolutepath] $datadir = undef,
137+
Optional[Stdlib::Absolutepath] $confdir = undef,
138+
Optional[Stdlib::Absolutepath] $bindir = undef,
139+
Optional[Stdlib::Absolutepath] $xlogdir = undef,
140+
Optional[Stdlib::Absolutepath] $logdir = undef,
141141
Optional[String[1]] $log_line_prefix = undef,
142142
Optional[Boolean] $manage_datadir = undef,
143143
Optional[Boolean] $manage_logdir = undef,
@@ -167,7 +167,7 @@
167167

168168
Optional[Boolean] $manage_package_repo = undef,
169169
Boolean $manage_dnf_module = false,
170-
Optional[String[1]] $module_workdir = undef,
170+
Optional[Stdlib::Absolutepath] $module_workdir = undef,
171171
) {
172172
# We are determining this here, because it is needed by the package repo
173173
# class.

manifests/server.pp

+4-4
Original file line numberDiff line numberDiff line change
@@ -146,9 +146,9 @@
146146
Optional[Stdlib::Filemode] $postgresql_conf_mode = $postgresql::params::postgresql_conf_mode,
147147
Stdlib::Absolutepath $recovery_conf_path = $postgresql::params::recovery_conf_path,
148148

149-
String[1] $datadir = $postgresql::params::datadir,
150-
Optional[String[1]] $xlogdir = $postgresql::params::xlogdir,
151-
Optional[String[1]] $logdir = $postgresql::params::logdir,
149+
Stdlib::Absolutepath $datadir = $postgresql::params::datadir,
150+
Optional[Stdlib::Absolutepath] $xlogdir = $postgresql::params::xlogdir,
151+
Optional[Stdlib::Absolutepath] $logdir = $postgresql::params::logdir,
152152

153153
Optional[String[1]] $log_line_prefix = $postgresql::params::log_line_prefix,
154154

@@ -173,7 +173,7 @@
173173
Boolean $manage_recovery_conf = $postgresql::params::manage_recovery_conf,
174174
Boolean $manage_postgresql_conf_perms = $postgresql::params::manage_postgresql_conf_perms,
175175
Boolean $manage_selinux = $postgresql::params::manage_selinux,
176-
String[1] $module_workdir = $postgresql::params::module_workdir,
176+
Stdlib::Absolutepath $module_workdir = $postgresql::params::module_workdir,
177177

178178
Boolean $manage_datadir = $postgresql::params::manage_datadir,
179179
Boolean $manage_logdir = $postgresql::params::manage_logdir,

manifests/server/instance/config.pp

+2-2
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@
6464
Boolean $manage_pg_ident_conf = $postgresql::server::manage_pg_ident_conf,
6565
Boolean $manage_recovery_conf = $postgresql::server::manage_recovery_conf,
6666
Boolean $manage_postgresql_conf_perms = $postgresql::server::manage_postgresql_conf_perms,
67-
String[1] $datadir = $postgresql::server::datadir,
68-
Optional[String[1]] $logdir = $postgresql::server::logdir,
67+
Stdlib::Absolutepath $datadir = $postgresql::server::datadir,
68+
Optional[Stdlib::Absolutepath] $logdir = $postgresql::server::logdir,
6969
String[1] $service_name = $postgresql::server::service_name,
7070
Boolean $service_enable = $postgresql::server::service_enable,
7171
Optional[String[1]] $log_line_prefix = $postgresql::server::log_line_prefix,

manifests/server/instance/initdb.pp

+4-4
Original file line numberDiff line numberDiff line change
@@ -29,21 +29,21 @@
2929
Optional[String[1]] $auth_host = $postgresql::server::auth_host,
3030
Optional[String[1]] $auth_local = $postgresql::server::auth_local,
3131
Optional[Boolean] $data_checksums = $postgresql::server::data_checksums,
32-
String[1] $datadir = $postgresql::server::datadir,
32+
Stdlib::Absolutepath $datadir = $postgresql::server::datadir,
3333
Optional[String[1]] $encoding = $postgresql::server::encoding,
3434
String[1] $group = $postgresql::server::group,
3535
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,
38-
Optional[String[1]] $logdir = $postgresql::server::logdir,
38+
Optional[Stdlib::Absolutepath] $logdir = $postgresql::server::logdir,
3939
Boolean $manage_datadir = $postgresql::server::manage_datadir,
4040
Boolean $manage_logdir = $postgresql::server::manage_logdir,
4141
Boolean $manage_xlogdir = $postgresql::server::manage_xlogdir,
42-
String[1] $module_workdir = $postgresql::server::module_workdir,
42+
Stdlib::Absolutepath $module_workdir = $postgresql::server::module_workdir,
4343
Boolean $needs_initdb = $postgresql::server::needs_initdb,
4444
String[1] $user = $postgresql::server::user,
4545
Optional[String[1]] $username = $postgresql::server::username,
46-
Optional[String[1]] $xlogdir = $postgresql::server::xlogdir,
46+
Optional[Stdlib::Absolutepath] $xlogdir = $postgresql::server::xlogdir,
4747
) {
4848
if $facts['os']['family'] == 'RedHat' and $facts['os']['selinux']['enabled'] == true {
4949
$seltype = 'postgresql_db_t'

manifests/server/instance/late_initdb.pp

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
String[1] $group = $postgresql::server::group,
1818
Stdlib::Absolutepath $psql_path = $postgresql::server::psql_path,
1919
Stdlib::Port $port = $postgresql::server::port,
20-
String[1] $module_workdir = $postgresql::server::module_workdir,
20+
Stdlib::Absolutepath $module_workdir = $postgresql::server::module_workdir,
2121
) {
2222
# Set the defaults for the postgresql_psql resource
2323
Postgresql_psql {

manifests/server/instance/passwd.pp

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
Stdlib::Absolutepath $psql_path = $postgresql::server::psql_path,
2020
Stdlib::Port $port = $postgresql::server::port,
2121
String[1] $database = $postgresql::server::default_database,
22-
String[1] $module_workdir = $postgresql::server::module_workdir,
22+
Stdlib::Absolutepath $module_workdir = $postgresql::server::module_workdir,
2323
Optional[Variant[String[1], Sensitive[String[1]], Integer]] $postgres_password = $postgresql::server::postgres_password,
2424
) {
2525
$real_postgres_password = if $postgres_password =~ Sensitive {

0 commit comments

Comments
 (0)