Skip to content

Commit

Permalink
add default settings for paths
Browse files Browse the repository at this point in the history
* postgresql::server::config_entry in postgresql::server::instance::config
* easier path management in postgresql::server::config_entry
* add taget to $pg_hba_conf_defaults
  • Loading branch information
SimonHoenscheid committed Sep 27, 2023
1 parent 144d448 commit f6ff7c2
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
12 changes: 11 additions & 1 deletion manifests/server/instance/config.pp
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,8 @@
if $pg_hba_conf_defaults {
Postgresql::Server::Pg_hba_rule {
database => 'all',
user => 'all',
target => $pg_hba_conf_path,
user => 'all',
}

postgresql::server::pg_hba_rule {
Expand Down Expand Up @@ -135,6 +136,10 @@
auth_method => $_pg_hba_auth_password_encryption,
order => 101;
}
} else {
Postgresql::Server::Pg_hba_rule {
target => $pg_hba_conf_path,
}
}

# $ipv4acls and $ipv6acls are arrays of rule strings
Expand All @@ -148,6 +153,11 @@
}
}
}
# set default postgresql_conf_path here so the path is configurable in instances for
# default values like port or listen_address
Postgresql::Server::Config_entry {
path => $postgresql_conf_path,
}

if $manage_postgresql_conf_perms {
file { $postgresql_conf_path:
Expand Down
3 changes: 0 additions & 3 deletions manifests/server/pg_hba_rule.pp
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,6 @@
String[1] $description = 'none',
Optional[String] $auth_option = undef,
Variant[String, Integer] $order = 150,

# Needed for testing primarily, support for multiple files is not really
# working.
Stdlib::Absolutepath $target = $postgresql::server::pg_hba_conf_path,
String $postgresql_version = $postgresql::server::_version
) {
Expand Down

0 comments on commit f6ff7c2

Please sign in to comment.