Skip to content

Commit

Permalink
Merge pull request #1499 from SimonHoenscheid/resonable_datatypes_for…
Browse files Browse the repository at this point in the history
…_paths_and_directories

set datatype for directories to Stdlib::Absolutepath
  • Loading branch information
bastelfreak authored Sep 1, 2023
2 parents 1dadd63 + f43f4b8 commit c8151ea
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 18 deletions.
12 changes: 6 additions & 6 deletions manifests/globals.pp
Original file line number Diff line number Diff line change
Expand Up @@ -133,11 +133,11 @@

Optional[Boolean] $pg_hba_conf_defaults = undef,

Optional[String[1]] $datadir = undef,
Optional[String[1]] $confdir = undef,
Optional[String[1]] $bindir = undef,
Optional[String[1]] $xlogdir = undef,
Optional[String[1]] $logdir = undef,
Optional[Stdlib::Absolutepath] $datadir = undef,
Optional[Stdlib::Absolutepath] $confdir = undef,
Optional[Stdlib::Absolutepath] $bindir = undef,
Optional[Stdlib::Absolutepath] $xlogdir = undef,
Optional[Stdlib::Absolutepath] $logdir = undef,
Optional[String[1]] $log_line_prefix = undef,
Optional[Boolean] $manage_datadir = undef,
Optional[Boolean] $manage_logdir = undef,
Expand Down Expand Up @@ -167,7 +167,7 @@

Optional[Boolean] $manage_package_repo = undef,
Boolean $manage_dnf_module = false,
Optional[String[1]] $module_workdir = undef,
Optional[Stdlib::Absolutepath] $module_workdir = undef,
) {
# We are determining this here, because it is needed by the package repo
# class.
Expand Down
8 changes: 4 additions & 4 deletions manifests/server.pp
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,9 @@
Optional[Stdlib::Filemode] $postgresql_conf_mode = $postgresql::params::postgresql_conf_mode,
Stdlib::Absolutepath $recovery_conf_path = $postgresql::params::recovery_conf_path,

String[1] $datadir = $postgresql::params::datadir,
Optional[String[1]] $xlogdir = $postgresql::params::xlogdir,
Optional[String[1]] $logdir = $postgresql::params::logdir,
Stdlib::Absolutepath $datadir = $postgresql::params::datadir,
Optional[Stdlib::Absolutepath] $xlogdir = $postgresql::params::xlogdir,
Optional[Stdlib::Absolutepath] $logdir = $postgresql::params::logdir,

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

Expand All @@ -173,7 +173,7 @@
Boolean $manage_recovery_conf = $postgresql::params::manage_recovery_conf,
Boolean $manage_postgresql_conf_perms = $postgresql::params::manage_postgresql_conf_perms,
Boolean $manage_selinux = $postgresql::params::manage_selinux,
String[1] $module_workdir = $postgresql::params::module_workdir,
Stdlib::Absolutepath $module_workdir = $postgresql::params::module_workdir,

Boolean $manage_datadir = $postgresql::params::manage_datadir,
Boolean $manage_logdir = $postgresql::params::manage_logdir,
Expand Down
4 changes: 2 additions & 2 deletions manifests/server/instance/config.pp
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@
Boolean $manage_pg_ident_conf = $postgresql::server::manage_pg_ident_conf,
Boolean $manage_recovery_conf = $postgresql::server::manage_recovery_conf,
Boolean $manage_postgresql_conf_perms = $postgresql::server::manage_postgresql_conf_perms,
String[1] $datadir = $postgresql::server::datadir,
Optional[String[1]] $logdir = $postgresql::server::logdir,
Stdlib::Absolutepath $datadir = $postgresql::server::datadir,
Optional[Stdlib::Absolutepath] $logdir = $postgresql::server::logdir,
String[1] $service_name = $postgresql::server::service_name,
Boolean $service_enable = $postgresql::server::service_enable,
Optional[String[1]] $log_line_prefix = $postgresql::server::log_line_prefix,
Expand Down
8 changes: 4 additions & 4 deletions manifests/server/instance/initdb.pp
Original file line number Diff line number Diff line change
Expand Up @@ -29,21 +29,21 @@
Optional[String[1]] $auth_host = $postgresql::server::auth_host,
Optional[String[1]] $auth_local = $postgresql::server::auth_local,
Optional[Boolean] $data_checksums = $postgresql::server::data_checksums,
String[1] $datadir = $postgresql::server::datadir,
Stdlib::Absolutepath $datadir = $postgresql::server::datadir,
Optional[String[1]] $encoding = $postgresql::server::encoding,
String[1] $group = $postgresql::server::group,
Stdlib::Absolutepath $initdb_path = $postgresql::server::initdb_path,
Optional[String[1]] $lc_messages = $postgresql::server::lc_messages,
Optional[String[1]] $locale = $postgresql::server::locale,
Optional[String[1]] $logdir = $postgresql::server::logdir,
Optional[Stdlib::Absolutepath] $logdir = $postgresql::server::logdir,
Boolean $manage_datadir = $postgresql::server::manage_datadir,
Boolean $manage_logdir = $postgresql::server::manage_logdir,
Boolean $manage_xlogdir = $postgresql::server::manage_xlogdir,
String[1] $module_workdir = $postgresql::server::module_workdir,
Stdlib::Absolutepath $module_workdir = $postgresql::server::module_workdir,
Boolean $needs_initdb = $postgresql::server::needs_initdb,
String[1] $user = $postgresql::server::user,
Optional[String[1]] $username = $postgresql::server::username,
Optional[String[1]] $xlogdir = $postgresql::server::xlogdir,
Optional[Stdlib::Absolutepath] $xlogdir = $postgresql::server::xlogdir,
) {
if $facts['os']['family'] == 'RedHat' and $facts['os']['selinux']['enabled'] == true {
$seltype = 'postgresql_db_t'
Expand Down
2 changes: 1 addition & 1 deletion manifests/server/instance/late_initdb.pp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
String[1] $group = $postgresql::server::group,
Stdlib::Absolutepath $psql_path = $postgresql::server::psql_path,
Stdlib::Port $port = $postgresql::server::port,
String[1] $module_workdir = $postgresql::server::module_workdir,
Stdlib::Absolutepath $module_workdir = $postgresql::server::module_workdir,
) {
# Set the defaults for the postgresql_psql resource
Postgresql_psql {
Expand Down
2 changes: 1 addition & 1 deletion manifests/server/instance/passwd.pp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
Stdlib::Absolutepath $psql_path = $postgresql::server::psql_path,
Stdlib::Port $port = $postgresql::server::port,
String[1] $database = $postgresql::server::default_database,
String[1] $module_workdir = $postgresql::server::module_workdir,
Stdlib::Absolutepath $module_workdir = $postgresql::server::module_workdir,
Optional[Variant[String[1], Sensitive[String[1]], Integer]] $postgres_password = $postgresql::server::postgres_password,
) {
$real_postgres_password = if $postgres_password =~ Sensitive {
Expand Down

0 comments on commit c8151ea

Please sign in to comment.