Add actual postgresl module from puppetlabs
[mirror/dsa-puppet.git] / 3rdparty / modules / postgresql / examples / postgresql_user.pp
1 class { 'postgresql::server':
2     config_hash => {
3         'ip_mask_deny_postgres_user' => '0.0.0.0/32',
4         'ip_mask_allow_all_users'    => '0.0.0.0/0',
5         'listen_addresses'           => '*',
6         'manage_redhat_firewall'     => true,
7         'postgres_password'          => 'postgres',
8     },
9 }
10
11 # TODO: in mysql module, the username includes, e.g., '@%' or '@localhost', which
12 #  affects the user's ability to connect from remote hosts.  In postgres this is
13 #  managed via pg_hba.conf; not sure if we want to try to reconcile that difference
14 #  in the modules or not.
15 postgresql::database_user{ 'redmine':
16   # TODO: ensure is not yet supported
17   #ensure        => present,
18   password_hash => postgresql_password('redmine', 'redmine'),
19   require       => Class['postgresql::server'],
20 }
21
22 postgresql::database_user{ 'dan':
23   # TODO: ensure is not yet supported
24   #ensure        => present,
25   password_hash => postgresql_password('dan', 'blah'),
26   require       => Class['postgresql::server'],
27 }
28