Skip to content

Commit f6ff7c2

Browse files
add default settings for paths
* postgresql::server::config_entry in postgresql::server::instance::config * easier path management in postgresql::server::config_entry * add taget to $pg_hba_conf_defaults
1 parent 144d448 commit f6ff7c2

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

manifests/server/instance/config.pp

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,8 @@
9494
if $pg_hba_conf_defaults {
9595
Postgresql::Server::Pg_hba_rule {
9696
database => 'all',
97-
user => 'all',
97+
target => $pg_hba_conf_path,
98+
user => 'all',
9899
}
99100

100101
postgresql::server::pg_hba_rule {
@@ -135,6 +136,10 @@
135136
auth_method => $_pg_hba_auth_password_encryption,
136137
order => 101;
137138
}
139+
} else {
140+
Postgresql::Server::Pg_hba_rule {
141+
target => $pg_hba_conf_path,
142+
}
138143
}
139144

140145
# $ipv4acls and $ipv6acls are arrays of rule strings
@@ -148,6 +153,11 @@
148153
}
149154
}
150155
}
156+
# set default postgresql_conf_path here so the path is configurable in instances for
157+
# default values like port or listen_address
158+
Postgresql::Server::Config_entry {
159+
path => $postgresql_conf_path,
160+
}
151161

152162
if $manage_postgresql_conf_perms {
153163
file { $postgresql_conf_path:

manifests/server/pg_hba_rule.pp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,6 @@
3232
String[1] $description = 'none',
3333
Optional[String] $auth_option = undef,
3434
Variant[String, Integer] $order = 150,
35-
36-
# Needed for testing primarily, support for multiple files is not really
37-
# working.
3835
Stdlib::Absolutepath $target = $postgresql::server::pg_hba_conf_path,
3936
String $postgresql_version = $postgresql::server::_version
4037
) {

0 commit comments

Comments
 (0)