Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mongodb no longer provides the stable link #361

Merged
merged 2 commits into from
Aug 31, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions manifests/globals.pp
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@

# Setup of the repo only makes sense globally, so we are doing it here.
if($manage_package_repo) {
if $use_enterprise_repo == true and $version == undef {
fail('You must set mongodb::globals::version when mongodb::globals::use_enterprise_repo is true')
}

class { '::mongodb::repo':
ensure => present,
repo_location => $repo_location,
Expand Down
6 changes: 4 additions & 2 deletions manifests/repo.pp
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,17 @@
) inherits mongodb::params {
case $::osfamily {
'RedHat', 'Linux': {
if $version != undef {
$mongover = split($version, '[.]')
}
if ($repo_location != undef){
$location = $repo_location
$description = 'MongoDB Custom Repository'
} elsif $mongodb::globals::use_enterprise_repo == true {
$location = 'https://repo.mongodb.com/yum/redhat/$releasever/mongodb-enterprise/stable/$basearch/'
$location = "https://repo.mongodb.com/yum/redhat/\$releasever/mongodb-enterprise/${mongover[0]}.${mongover[1]}/\$basearch/"
$description = 'MongoDB Enterprise Repository'
}
elsif $version and (versioncmp($version, '3.0.0') >= 0) {
$mongover = split($version, '[.]')
$location = $::architecture ? {
'x86_64' => "http://repo.mongodb.org/yum/redhat/${::operatingsystemmajrelease}/mongodb-org/${mongover[0]}.${mongover[1]}/x86_64/",
default => undef
Expand Down