1 class profile::postgresql {
2 $password_seed = lookup("base_installation::puppet_pass_seed") |$key| { {} }
4 class { '::postgresql::globals':
6 locale => 'en_US.UTF-8',
7 pg_hba_conf_defaults => false,
10 # FIXME: get it from the postgresql module?
13 class { '::postgresql::client': }
15 # FIXME: postgresql module is buggy and doesn't create dir?
16 file { "/var/lib/postgres":
20 before => File["/var/lib/postgres/data"],
21 require => Package["postgresql-server"],
24 class { '::postgresql::server':
25 postgres_password => generate_password(24, $password_seed, "postgres")
28 postgresql::server::pg_hba_rule { 'local access as postgres user':
29 description => 'Allow local access to postgres user',
33 auth_method => 'ident',
36 postgresql::server::pg_hba_rule { 'deny access to postgresql user':
37 description => 'Deny remote access to postgres user',
41 address => "0.0.0.0/0",
42 auth_method => 'reject',
46 postgresql::server::pg_hba_rule { 'local access':
47 description => 'Allow local access with password',
55 postgresql::server::pg_hba_rule { 'local access with same name':
56 description => 'Allow local access with same name',
60 auth_method => 'ident',