Skip to content

Commit

Permalink
$password_hash was not being encrypted which caused an ALTER ROLE to …
Browse files Browse the repository at this point in the history
…be run every time the puppet agent runs. This should fix that. Fixes puppetlabs#216
  • Loading branch information
mlehner616 committed Jul 25, 2013
1 parent 721d5e9 commit 13223ac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion manifests/role.pp
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@

if $password_hash {
postgresql_psql {"ALTER ROLE \"${username}\" ${password_sql}":
unless => "SELECT usename FROM pg_shadow WHERE usename='${username}' and passwd='${password_hash}'",
unless => "SELECT usename FROM pg_shadow WHERE usename='${username}' and passwd = 'md5' || md5('${password_hash}' || '${username}')"
}
}
}

0 comments on commit 13223ac

Please sign in to comment.