Skip to content

Commit 7fbfcd7

Browse files
author
Johan De Wit
committed
Adjust to earliest supported version by mongodb, 4.4
1 parent 9680701 commit 7fbfcd7

File tree

2 files changed

+11
-16
lines changed

2 files changed

+11
-16
lines changed

manifests/globals.pp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,7 @@
1616
$ipv6 = undef,
1717
$bind_ip = undef,
1818

19-
$version = fact('os.distro.codename') ? { # Debian 10 doesn't provide mongodb 3.6.
20-
'buster' => '4.4.8',
21-
default => undef
22-
},
19+
$version = '4.4', # Minimal
2320
$manage_package_repo = fact('os.distro.codename') ? { # Debian 10 doesn't provide mongodb packages. So manage it!
2421
'buster' => true,
2522
default => undef
@@ -49,7 +46,7 @@
4946
if $manage_package_repo != false {
5047
class { 'mongodb::repo':
5148
ensure => present,
52-
version => pick($version, '3.6'),
49+
version => $version,
5350
use_enterprise_repo => $use_enterprise_repo,
5451
repo_location => $repo_location,
5552
proxy => $repo_proxy,

manifests/repo.pp

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
if $repo_location != undef {
1515
$location = $repo_location
1616
$description = 'MongoDB Custom Repository'
17-
} elsif $version == undef or versioncmp($version, '3.0.0') < 0 {
18-
fail('Package repositories for versions older than 3.0 are unsupported')
17+
} elsif $version == undef or versioncmp($version, '4.4.0') < 0 {
18+
fail('Package repositories for versions older than 4.4 are unsupported')
1919
} else {
2020
$mongover = split($version, '[.]')
2121
if $use_enterprise_repo {
@@ -34,8 +34,8 @@
3434
if $repo_location {
3535
$location = $repo_location
3636
$description = 'MongoDB Custom Repository'
37-
} elsif $version == undef or versioncmp($version, '3.2.0') < 0 {
38-
fail('Package repositories for versions older than 3.2 are unsupported')
37+
} elsif $version == undef or versioncmp($version, '4.4.0') < 0 {
38+
fail('Package repositories for versions older than 4.4 are unsupported')
3939
} else {
4040
$mongover = split($version, '[.]')
4141
$location = "https://repo.mongodb.org/zypper/suse/\$releasever_major/mongodb-org/${mongover[0]}.${mongover[1]}/\$basearch/"
@@ -48,8 +48,8 @@
4848
'Debian': {
4949
if $repo_location != undef {
5050
$location = $repo_location
51-
} elsif $version == undef or versioncmp($version, '3.0.0') < 0 {
52-
fail('Package repositories for versions older than 3.0 are unsupported')
51+
} elsif $version == undef or versioncmp($version, '4.4.0') < 0 {
52+
fail('Package repositories for versions older than 4.4 are unsupported')
5353
} else {
5454
if $use_enterprise_repo == true {
5555
$repo_domain = 'repo.mongodb.com'
@@ -72,13 +72,11 @@
7272
default => undef
7373
}
7474
$key = "${mongover[0]}.${mongover[1]}" ? {
75+
'6.0' => '39BD841E4BE5FB195A65400E6A26B1AE64C3C388',
7576
'5.0' => 'F5679A222C647C87527C2F8CB00A0BD1E2C63C11',
77+
'4.8' => '1283B7BB8CF331A5BE0E1E100EBB00BA3BC3DCCB',
78+
'4.6' => '99DC630F00A2F97F27C6A02A253612A09571B484',
7679
'4.4' => '20691EEC35216C63CAF66CE1656408E390CFB1F5',
77-
'4.2' => 'E162F504A20CDF15827F718D4B7C549A058F8B6B',
78-
'4.0' => '9DA31620334BD75D9DCB49F368818C72E52529D4',
79-
'3.6' => '2930ADAE8CAF5059EE73BB4B58712A2291FA4AD5',
80-
'3.4' => '0C49F3730359A14518585931BC711F9BA15703C6',
81-
'3.2' => '42F3E95A2C4F08279C4960ADD68FA50FEA312927',
8280
default => '492EAFE8CD016A07919F1D2B9ECBEC467F0CEB10'
8381
}
8482
$key_server = 'hkp://keyserver.ubuntu.com:80'

0 commit comments

Comments
 (0)