puppetlabs/puppetlabs-mongodb — pull request #133 by tk6022 (2014-08-21 11:55:23+00:00)
Title: Fixing mongodb_user to allow for multiple users to be created with the same name

Came across this issue through the following use case: using mongodb::db to create multiple databases, each with the same user name. Puppet was unable to compile catalog because it then had duplicate resources with the mongo user.

I have made the user have a composite namevar based on both name and database and have added title patterns to allow for (backwards compatible) or :.