Merge pull request #29 from etiennep/master

Issue #28
This commit is contained in:
Chris Price 2012-11-09 08:13:01 -08:00
commit b8ccbeb3c5
2 changed files with 9 additions and 7 deletions

View file

@ -7,5 +7,5 @@ summary 'PostgreSQL defined resource types'
license 'Apache'
project_page 'https://github.com/puppetlabs/puppet-postgresql/issues'
dependency 'puppetlabs/stdlib', '2.x'
dependency 'puppetlabs/stdlib', '3.x'
dependency 'puppetlabs/firewall', '>= 0.0.4'

View file

@ -46,12 +46,14 @@ define postgresql::db (
require => Class['postgresql::server'],
}
postgresql::database_user { $user:
# TODO: ensure is not yet supported
#ensure => present,
password_hash => $password,
#provider => 'postgresql',
require => Postgresql::Database[$name],
if ! defined(Postgresql::Database_user[$user]) {
postgresql::database_user { $user:
# TODO: ensure is not yet supported
#ensure => present,
password_hash => $password,
#provider => 'postgresql',
require => Postgresql::Database[$name],
}
}
postgresql::database_grant { "GRANT ${user} - ${grant} - ${name}":