aboutsummaryrefslogtreecommitdiffstats
path: root/modules/postgresql/manifests/server.pp
diff options
context:
space:
mode:
authorNicolas Vigier <boklm@mageia.org>2013-01-17 17:28:59 +0000
committerNicolas Vigier <boklm@mageia.org>2013-01-17 17:28:59 +0000
commit86114729e8c8288e12be7e494adfc302230f3931 (patch)
tree8be1c89fa1348830b49cc43992c8286c7855ef68 /modules/postgresql/manifests/server.pp
parentebe4bbc484513d496722d9d5fc60646cc3faa587 (diff)
downloadpuppet-86114729e8c8288e12be7e494adfc302230f3931.tar
puppet-86114729e8c8288e12be7e494adfc302230f3931.tar.gz
puppet-86114729e8c8288e12be7e494adfc302230f3931.tar.bz2
puppet-86114729e8c8288e12be7e494adfc302230f3931.tar.xz
puppet-86114729e8c8288e12be7e494adfc302230f3931.zip
Add postgresql::hba_entry and postgresql::var
Diffstat (limited to 'modules/postgresql/manifests/server.pp')
-rw-r--r--modules/postgresql/manifests/server.pp23
1 files changed, 15 insertions, 8 deletions
diff --git a/modules/postgresql/manifests/server.pp b/modules/postgresql/manifests/server.pp
index 8089bb4c..85f5dda5 100644
--- a/modules/postgresql/manifests/server.pp
+++ b/modules/postgresql/manifests/server.pp
@@ -1,15 +1,14 @@
class postgresql::server {
- $pgsql_data = '/var/lib/pgsql/data/'
- $pg_version = '9.0'
+ include postgresql::var
# missing requires is corrected in cooker,
# should be removed
# once the fix is in a stable release
- package { "postgresql${pg_version}-plpgsql":
+ package { "postgresql${postgresql::var::pg_version}-plpgsql":
alias => 'postgresql-plpgsql',
}
- package { "postgresql${pg_version}-server":
+ package { "postgresql${postgresql::var::pg_version}-server":
alias => 'postgresql-server',
require => Package['postgresql-plpgsql'],
}
@@ -24,7 +23,7 @@ class postgresql::server {
openssl::self_signed_splitted_cert { "pgsql.$::domain":
filename => 'server',
- directory => $pgsql_data,
+ directory => $postgresql::var::pgsql_data,
owner => 'postgres',
group => 'postgres',
require => Package['postgresql-server']
@@ -35,12 +34,20 @@ class postgresql::server {
content => template('postgresql/pam'),
}
- postgresql::pg_hba { "${pgsql_data}/pg_hba.conf": }
+ @postgresql::pg_hba { $postgresql::var::hba_file: }
+
+ postgresql::hba_entry { 'allow_local_ipv4':
+ type => 'host',
+ database => 'all',
+ user => 'all',
+ address => '127.0.0.1/32',
+ method => 'md5',
+ }
postgresql::config {
- "$pgsql_data/pg_ident.conf":
+ "${postgresql::var::pgsql_data}/pg_ident.conf":
content => template('postgresql/pg_ident.conf');
- "$pgsql_data/postgresql.conf":
+ "${postgresql::var::pgsql_data}/postgresql.conf":
content => template('postgresql/postgresql.conf');
}
}