Skip to content

Commit 9109991

Browse files
committed
(MODULE-1835) Add mongoDB >=3.x new yum repo location
1 parent 6e0351d commit 9109991

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

manifests/repo.pp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,21 @@
11
# PRIVATE CLASS: do not use directly
22
class mongodb::repo (
33
$ensure = $mongodb::params::ensure,
4+
$version = $mongodb::params::version,
45
) inherits mongodb::params {
56
case $::osfamily {
67
'RedHat', 'Linux': {
78
if $mongodb::globals::use_enterprise_repo == true {
89
$location = 'https://repo.mongodb.com/yum/redhat/$releasever/mongodb-enterprise/stable/$basearch/'
910
$description = 'MongoDB Enterprise Repository'
1011
}
12+
elsif (versioncmp($version, '3.0.0') >= 0) {
13+
$mongover = split($version, '[.]')
14+
$location = $::architecture ? {
15+
'x86_64' => "http://repo.mongodb.org/yum/redhat/${::operatingsystemmajrelease}/mongodb-org/${mongover[0]}.${mongover[1]}/x86_64/",
16+
default => undef
17+
}
18+
}
1119
else {
1220
$location = $::architecture ? {
1321
'x86_64' => 'http://downloads-distro.mongodb.org/repo/redhat/os/x86_64/',

0 commit comments

Comments
 (0)