File tree Expand file tree Collapse file tree 1 file changed +3
-0
lines changed
lib/puppet/provider/mongodb_user Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments