Skip to content

Commit 43733d4

Browse files
author
Johan De Wit
committed
[debug] debugging user management
1 parent 4998c26 commit 43733d4

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/puppet/provider/mongodb_user/mongodb.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ def self.instances
2020
users = JSON.parse out
2121

2222
users.map do |user|
23+
Puppet.debug("Fetching user #{user}")
2324
db = if user['db'] == '$external'
2425
# For external users, we need to retreive the original DB name from here.
2526
user['customData']['createdBy'][%r{.*on db (.*)'\]$}, 1]
@@ -81,8 +82,10 @@ def create
8182
end
8283

8384
if @resource[:auth_mechanism] == :x509
85+
Puppet.debug("Creating user for x509 with command #{command}")
8486
mongo_eval("db.getSiblingDB(\"$external\").runCommand(#{command.to_json})", @resource[:database])
8587
else
88+
Puppet.debug("Creating user for with command #{command}")
8689
mongo_eval("db.runCommand(#{command.to_json})", @resource[:database])
8790
end
8891
else

0 commit comments

Comments
 (0)