File tree Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change 23
23
24
24
exec { "10gen-apt-repo" :
25
25
path => " /bin:/usr/bin" ,
26
- command => " add-apt-repository '${mongodb::params::repository} '" ,
26
+ command => " echo '${mongodb::params::repository} ' >> /etc/apt/sources.list " ,
27
27
unless => " cat /etc/apt/sources.list | grep 10gen" ,
28
28
require => Package[" python-software-properties" ],
29
29
}
42
42
require => Exec[" 10gen-apt-key" ],
43
43
}
44
44
45
- package { " mongodb-stable" :
45
+ package { $ mongodb::params::package :
46
46
ensure => installed,
47
47
require => Exec[" update-apt" ],
48
48
}
49
49
50
50
service { "mongodb" :
51
51
enable => true ,
52
52
ensure => running ,
53
- require => Package[" mongodb-stable " ],
53
+ require => Package[$ mongodb::params::package ],
54
54
}
55
55
56
56
define replica_set {
57
57
file { "/etc/init/mongodb.conf" :
58
58
content => template (" mongodb/mongodb.conf.erb" ),
59
59
mode => " 0644" ,
60
60
notify => Service[" mongodb" ],
61
- require => Package[" mongodb-stable " ],
61
+ require => Package[$ mongodb::params::package ],
62
62
}
63
63
}
64
64
}
Original file line number Diff line number Diff line change 4
4
#
5
5
# Parameters:
6
6
# - The 10gen Ubuntu $repository to use
7
+ # - The 10gen Ubuntu $package to use
7
8
#
8
9
# Sample Usage:
9
10
# include mongodb::params
12
13
case $operatingsystemrelease {
13
14
" 10.04" : {
14
15
$repository =" deb http://downloads.mongodb.org/distros/ubuntu 10.4 10gen"
16
+ $package =" mongodb-stable"
15
17
}
16
18
" 10.10" : {
17
19
$repository =" deb http://downloads.mongodb.org/distros/ubuntu 10.10 10gen"
20
+ $package =" mongodb-stable"
21
+ }
22
+ " 11.04" : {
23
+ $repository =" deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen"
24
+ $package =" mongodb-10gen"
18
25
}
19
26
}
20
27
}
You can’t perform that action at this time.
0 commit comments