From 94cc61ad7f76d94791fee4f596d3c8c3124c0526 Mon Sep 17 00:00:00 2001 From: Don Penney Date: Wed, 11 Jan 2017 14:25:20 -0500 Subject: [PATCH] Roll up TIS patches --- manifests/params.pp | 2 +- manifests/server/config.pp | 8 ++++++-- manifests/server/initdb.pp | 9 +++++++++ 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/manifests/params.pp b/manifests/params.pp index d40a1eb..45be360 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -74,7 +74,7 @@ class postgresql::params inherits postgresql::globals { } $psql_path = pick($psql_path, "${bindir}/psql") - $service_status = $service_status + $service_status = "systemctl is-active postgresql" $service_reload = "service ${service_name} reload" $perl_package_name = pick($perl_package_name, 'perl-DBD-Pg') $python_package_name = pick($python_package_name, 'python-psycopg2') diff --git a/manifests/server/config.pp b/manifests/server/config.pp index 205dd22..2ecad4b 100644 --- a/manifests/server/config.pp +++ b/manifests/server/config.pp @@ -111,6 +111,12 @@ class postgresql::server::config { postgresql::server::config_entry { 'data_directory': value => $datadir, } + postgresql::server::config_entry { 'hba_file': + value => $pg_hba_conf_path, + } + postgresql::server::config_entry { 'ident_file': + value => $pg_ident_conf_path, + } if $timezone { postgresql::server::config_entry { 'timezone': value => $timezone, @@ -154,7 +160,6 @@ class postgresql::server::config { concat { $pg_ident_conf_path: owner => $user, group => $group, - force => true, # do not crash if there is no pg_ident_rules mode => '0640', warn => true, notify => Class['postgresql::server::reload'], @@ -165,7 +170,6 @@ class postgresql::server::config { concat { $recovery_conf_path: owner => $user, group => $group, - force => true, # do not crash if there is no recovery conf file mode => '0640', warn => true, notify => Class['postgresql::server::reload'], diff --git a/manifests/server/initdb.pp b/manifests/server/initdb.pp index 2252a19..5e263e3 100644 --- a/manifests/server/initdb.pp +++ b/manifests/server/initdb.pp @@ -3,6 +3,7 @@ class postgresql::server::initdb { $needs_initdb = $postgresql::server::needs_initdb $initdb_path = $postgresql::server::initdb_path $datadir = $postgresql::server::datadir + $confdir = $postgresql::server::confdir $xlogdir = $postgresql::server::xlogdir $logdir = $postgresql::server::logdir $encoding = $postgresql::server::encoding @@ -41,6 +42,14 @@ class postgresql::server::initdb { seltype => $seltype, } + # Make sure the conf directory exists, and has the correct permissions. + file { $confdir: + ensure => directory, + owner => $user, + group => $group, + mode => '0700', + } + if($xlogdir) { # Make sure the xlog directory exists, and has the correct permissions. file { $xlogdir: -- 1.8.3.1