You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: lib/puppet/type/mongodb_user.rb
+10-8Lines changed: 10 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -57,7 +57,7 @@ def to_s?(value)
57
57
newproperty(:password_hash)do
58
58
desc'The password hash of the user. Use mongodb_password() for creating hash. Only available on MongoDB 3.0 and later. SCRAM-SHA-256 authentication mechanism is not supported.'
59
59
defaulttodo
60
-
raisePuppet::Error,"Property 'password_hash' must be set. Use mongodb_password() for creating hash."if@resource[:password].nil? && (provider.database == :absent)
60
+
raisePuppet::Error,"Property 'password_hash' must be set. Use mongodb_password() for creating hash."if@resource[:auth_mechanism] != :x509 && @resource[:password].nil? && (@resource[:password].nil? && (provider.database == :absent))
61
61
end
62
62
newvalue(%r{^\w+$})
63
63
@@ -97,7 +97,7 @@ def insync?(_is)
97
97
newparam(:auth_mechanism)do
98
98
desc'Authentication mechanism. Password verification is not supported with SCRAM-SHA-256.'
0 commit comments