Skip to content

Commit 92491f9

Browse files
author
Michiel Brandenburg
committed
added support for mongo 5.x
1 parent 0190f9d commit 92491f9

3 files changed

Lines changed: 11 additions & 1 deletion

File tree

lib/puppet/provider/mongodb.rb

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,4 +183,13 @@ def self.mongo_4?
183183
def mongo_4?
184184
self.class.mongo_4?
185185
end
186+
187+
def self.mongo_5?
188+
v = mongo_version
189+
!v[%r{^5\.}].nil?
190+
end
191+
192+
def mongo_5?
193+
self.class.mongo_5?
194+
end
186195
end

lib/puppet/provider/mongodb_user/mongodb.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ def create
6161
digestPassword: false
6262
}
6363

64-
if mongo_4?
64+
if mongo_4? || mongo_5?
6565
# SCRAM-SHA-256 requires digestPassword to be true.
6666
command[:mechanisms] = ['SCRAM-SHA-1']
6767
end

manifests/repo.pp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@
5757
default => undef
5858
}
5959
$key = "${mongover[0]}.${mongover[1]}" ? {
60+
'5.0' => 'F5679A222C647C87527C2F8CB00A0BD1E2C63C11',
6061
'4.4' => '20691EEC35216C63CAF66CE1656408E390CFB1F5',
6162
'4.2' => 'E162F504A20CDF15827F718D4B7C549A058F8B6B',
6263
'4.0' => '9DA31620334BD75D9DCB49F368818C72E52529D4',

0 commit comments

Comments
 (0)