Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ There are many ways to set up a postgres database using the `postgresql::db` cla
To manage users, roles and permissions:

postgresql::database_user{'marmot':
password_hash => 'foo',
password_hash => postgresql_password('marmot', 'foo'),
}

postgresql::database_grant { 'test1':
Expand Down
2 changes: 1 addition & 1 deletion manifests/database_user.pp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#
# Parameters:
# [*user*] - username to create.
# [*password_hash*] - user's password; this may be clear text, or an md5 hash as returned by the
# [*password_hash*] - user's password; this must be an md5 hash as returned by the
# "postgresql_password" function in this module.
#
# Actions:
Expand Down
5 changes: 2 additions & 3 deletions manifests/db.pp
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@
# Parameters:
# [*title*] - postgresql database name.
# [*user*] - username to create and grant access.
# [*password*] - user's password. may be md5-encoded, in the format returned by the "postgresql_password"
# function in this module
# [*password*] - user's password. must be plain text
# [*charset*] - database charset. defaults to 'utf8'
# [*grant*] - privilege to grant user. defaults to 'all'.
# [*tablespace*] - database tablespace. default to use the template database's tablespace.
Expand Down Expand Up @@ -59,7 +58,7 @@
postgresql::database_user { $user:
# TODO: ensure is not yet supported
#ensure => present,
password_hash => $password,
password_hash => postgresql_password($user, $password),
#provider => 'postgresql',
require => Postgresql::Database[$name],
}
Expand Down