1 class profile::postgresql {
2 $password_seed = lookup("base_installation::puppet_pass_seed")
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"),
26 listen_addresses => "*",
29 postgresql::server::pg_hba_rule { 'local access as postgres user':
30 description => 'Allow local access to postgres user',
34 auth_method => 'ident',
37 postgresql::server::pg_hba_rule { 'localhost access as postgres user':
38 description => 'Allow localhost access to postgres user',
42 address => "127.0.0.1/32",
46 postgresql::server::pg_hba_rule { 'localhost ip6 access as postgres user':
47 description => 'Allow localhost access to postgres user',
55 postgresql::server::pg_hba_rule { 'deny access to postgresql user':
56 description => 'Deny remote access to postgres user',
60 address => "0.0.0.0/0",
61 auth_method => 'reject',
65 postgresql::server::pg_hba_rule { 'local access':
66 description => 'Allow local access with password',
74 postgresql::server::pg_hba_rule { 'local access with same name':
75 description => 'Allow local access with same name',
79 auth_method => 'ident',