Removed references to $postgresql::paths in class params.
This commit is contained in:
parent
ca701b303c
commit
db1a34e7ea
1 changed files with 37 additions and 23 deletions
|
@ -39,36 +39,50 @@ class postgresql::config(
|
||||||
$listen_addresses = $postgresql::params::listen_addresses,
|
$listen_addresses = $postgresql::params::listen_addresses,
|
||||||
$ipv4acls = $postgresql::params::ipv4acls,
|
$ipv4acls = $postgresql::params::ipv4acls,
|
||||||
$ipv6acls = $postgresql::params::ipv6acls,
|
$ipv6acls = $postgresql::params::ipv6acls,
|
||||||
$pg_hba_conf_path = $postgresql::paths::pg_hba_conf_path,
|
$pg_hba_conf_path = '',
|
||||||
$postgresql_conf_path = $postgresql::paths::postgresql_conf_path,
|
$postgresql_conf_path = '',
|
||||||
$manage_redhat_firewall = $postgresql::params::manage_redhat_firewall
|
$manage_redhat_firewall = $postgresql::params::manage_redhat_firewall
|
||||||
) inherits postgresql::params {
|
) inherits postgresql::params {
|
||||||
|
|
||||||
include postgresql::paths
|
if ! $pg_hba_conf_path {
|
||||||
|
include postgresql::paths
|
||||||
|
$pg_hba_conf_path_real = $postgresql::paths::pg_hba_conf_path
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$pg_hba_conf_path_real = $pg_hba_conf_path
|
||||||
|
}
|
||||||
|
|
||||||
# Basically, all this class needs to handle is passing parameters on
|
if ! $postgresql_conf_path {
|
||||||
# to the "beforeservice" and "afterservice" classes, and ensure
|
include postgresql::paths
|
||||||
# the proper ordering.
|
$postgresql_conf_path_real = $postgresql::paths::postgresql_conf_path
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$postgresql_conf_path_real = $postgresql_conf_path
|
||||||
|
}
|
||||||
|
|
||||||
class { 'postgresql::config::beforeservice':
|
# Basically, all this class needs to handle is passing parameters on
|
||||||
ip_mask_deny_postgres_user => $ip_mask_deny_postgres_user,
|
# to the "beforeservice" and "afterservice" classes, and ensure
|
||||||
ip_mask_allow_all_users => $ip_mask_allow_all_users,
|
# the proper ordering.
|
||||||
listen_addresses => $listen_addresses,
|
|
||||||
ipv4acls => $ipv4acls,
|
|
||||||
ipv6acls => $ipv6acls,
|
|
||||||
pg_hba_conf_path => $pg_hba_conf_path,
|
|
||||||
postgresql_conf_path => $postgresql_conf_path,
|
|
||||||
manage_redhat_firewall => $manage_redhat_firewall,
|
|
||||||
}
|
|
||||||
|
|
||||||
class { 'postgresql::config::afterservice':
|
class { 'postgresql::config::beforeservice':
|
||||||
postgres_password => $postgres_password,
|
ip_mask_deny_postgres_user => $ip_mask_deny_postgres_user,
|
||||||
}
|
ip_mask_allow_all_users => $ip_mask_allow_all_users,
|
||||||
|
listen_addresses => $listen_addresses,
|
||||||
|
ipv4acls => $ipv4acls,
|
||||||
|
ipv6acls => $ipv6acls,
|
||||||
|
pg_hba_conf_path => $pg_hba_conf_path_real,
|
||||||
|
postgresql_conf_path => $postgresql_conf_path_real,
|
||||||
|
manage_redhat_firewall => $manage_redhat_firewall,
|
||||||
|
}
|
||||||
|
|
||||||
Class['postgresql::config'] ->
|
class { 'postgresql::config::afterservice':
|
||||||
Class['postgresql::config::beforeservice'] ->
|
postgres_password => $postgres_password,
|
||||||
Service['postgresqld'] ->
|
}
|
||||||
Class['postgresql::config::afterservice']
|
|
||||||
|
Class['postgresql::config'] ->
|
||||||
|
Class['postgresql::config::beforeservice'] ->
|
||||||
|
Service['postgresqld'] ->
|
||||||
|
Class['postgresql::config::afterservice']
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue