|
1 | 1 | # PRIVATE CLASS: do not use directly |
2 | 2 | class mongodb::repo ( |
3 | | - $ensure = $mongodb::params::ensure, |
4 | | - $version = $mongodb::params::version, |
| 3 | + $ensure = $mongodb::params::ensure, |
| 4 | + $version = $mongodb::params::version, |
| 5 | + $repo_location = undef, |
5 | 6 | ) inherits mongodb::params { |
6 | 7 | case $::osfamily { |
7 | 8 | 'RedHat', 'Linux': { |
8 | | - if $mongodb::globals::use_enterprise_repo == true { |
| 9 | + if ($repo_location != undef){ |
| 10 | + $location = $repo_location |
| 11 | + $description = 'MongoDB Custom Repository' |
| 12 | + } elsif $mongodb::globals::use_enterprise_repo == true { |
9 | 13 | $location = 'https://repo.mongodb.com/yum/redhat/$releasever/mongodb-enterprise/stable/$basearch/' |
10 | 14 | $description = 'MongoDB Enterprise Repository' |
11 | 15 | } |
|
25 | 29 | } |
26 | 30 | $description = 'MongoDB/10gen Repository' |
27 | 31 | } |
| 32 | + |
28 | 33 | class { '::mongodb::repo::yum': } |
29 | 34 | } |
30 | 35 |
|
31 | 36 | 'Debian': { |
32 | | - $location = $::operatingsystem ? { |
33 | | - 'Debian' => 'http://downloads-distro.mongodb.org/repo/debian-sysvinit', |
34 | | - 'Ubuntu' => 'http://downloads-distro.mongodb.org/repo/ubuntu-upstart', |
35 | | - default => undef |
| 37 | + if ($repo_location != undef){ |
| 38 | + $location = $repo_location |
| 39 | + }else{ |
| 40 | + $location = $::operatingsystem ? { |
| 41 | + 'Debian' => 'http://downloads-distro.mongodb.org/repo/debian-sysvinit', |
| 42 | + 'Ubuntu' => 'http://downloads-distro.mongodb.org/repo/ubuntu-upstart', |
| 43 | + default => undef |
| 44 | + } |
36 | 45 | } |
37 | 46 | class { '::mongodb::repo::apt': } |
38 | 47 | } |
|
0 commit comments