Skip to content

Commit

Permalink
make path configurable for config_entry
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonHoenscheid committed Aug 31, 2023
1 parent 4f1d08f commit 1e5f1d8
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions manifests/server/config_entry.pp
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,8 @@
Enum['present', 'absent'] $ensure = 'present',
String[1] $key = $name,
Optional[Variant[String[1], Numeric, Array[String[1]]]] $value = undef,
Variant[Boolean, String[1]] $path = false
Variant[Stdlib::Absolutepath] $path = $postgresql::server::postgresql_conf_path
) {
$postgresql_conf_path = $postgresql::server::postgresql_conf_path

$target = $path ? {
false => $postgresql_conf_path,
default => $path,
}

# Those are the variables that are marked as "(change requires restart)"
# on postgresql.conf. Items are ordered as on postgresql.conf.
#
Expand Down Expand Up @@ -91,7 +84,7 @@

postgresql_conf { $name:
ensure => $ensure,
target => $target,
target => $path,
name => $key,
value => $value,
require => Class['postgresql::server::initdb'],
Expand Down

0 comments on commit 1e5f1d8

Please sign in to comment.