File tree 1 file changed +5
-5
lines changed
lib/puppet/provider/mongodb_user
1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ def self.instances
11
11
12
12
Puppet . debug ( "MONGODB_USER self.instances" )
13
13
14
- # if db_ismaster
14
+ if db_ismaster
15
15
script = 'EJSON.stringify(db.system.users.find().toArray())'
16
16
# A hack to prevent prefetching failures until admin user is created
17
17
script = "try {#{ script } } catch (e) { if (e.message.match(/requires authentication/) || e.message.match(/not authorized on admin/)) { 'not authorized on admin' } else {throw e}}" if auth_enabled
@@ -41,10 +41,10 @@ def self.instances
41
41
password_hash : user [ 'credentials' ] [ 'MONGODB-CR' ] ,
42
42
scram_credentials : user [ 'credentials' ] [ 'SCRAM-SHA-1' ] )
43
43
end
44
- # else
45
- # Puppet.warning 'User info is available only from master host'
46
- # []
47
- # end
44
+ else
45
+ Puppet . warning 'User info is available only from master host'
46
+ [ ]
47
+ end
48
48
end
49
49
50
50
# Assign prefetched users based on username and database, not on id and name
You can’t perform that action at this time.
0 commit comments