Skip to content

Commit 45d9bf4

Browse files
authored
Merge pull request voxpupuli#632 from BDelacour/master
ReplicaSet with Auth creation
2 parents 58e45c7 + 896f5ed commit 45d9bf4

File tree

1 file changed

+1
-1
lines changed
  • lib/puppet/provider/mongodb_replset

1 file changed

+1
-1
lines changed

lib/puppet/provider/mongodb_replset/mongo.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ def get_hosts_status(members)
157157
raise Puppet::Error, "Can't configure replicaset #{name}, host #{host} is not supposed to be part of a replicaset."
158158
end
159159

160-
if auth_enabled && status.key?('errmsg') && (status['errmsg'].include?('unauthorized') || status['errmsg'].include?('not authorized'))
160+
if auth_enabled && status.key?('errmsg') && (status['errmsg'].include?('unauthorized') || status['errmsg'].include?('not authorized') || status['errmsg'].include?('requires authentication'))
161161
Puppet.warning "Host #{host} is available, but you are unauthorized because of authentication is enabled: #{auth_enabled}"
162162
alive.push(member)
163163
end

0 commit comments

Comments
 (0)