Skip to content

Commit e0de8cd

Browse files
committed
Merge pull request portertech#1 from mattmcmanus/master
Adding support for ubuntu 11.04
2 parents cc08c73 + ec6ef67 commit e0de8cd

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

manifests/init.pp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
exec { "10gen-apt-repo":
2525
path => "/bin:/usr/bin",
26-
command => "add-apt-repository '${mongodb::params::repository}'",
26+
command => "echo '${mongodb::params::repository}' >> /etc/apt/sources.list",
2727
unless => "cat /etc/apt/sources.list | grep 10gen",
2828
require => Package["python-software-properties"],
2929
}
@@ -42,23 +42,23 @@
4242
require => Exec["10gen-apt-key"],
4343
}
4444

45-
package { "mongodb-stable":
45+
package { $mongodb::params::package:
4646
ensure => installed,
4747
require => Exec["update-apt"],
4848
}
4949

5050
service { "mongodb":
5151
enable => true,
5252
ensure => running,
53-
require => Package["mongodb-stable"],
53+
require => Package[$mongodb::params::package],
5454
}
5555

5656
define replica_set {
5757
file { "/etc/init/mongodb.conf":
5858
content => template("mongodb/mongodb.conf.erb"),
5959
mode => "0644",
6060
notify => Service["mongodb"],
61-
require => Package["mongodb-stable"],
61+
require => Package[$mongodb::params::package],
6262
}
6363
}
6464
}

manifests/params.pp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
#
55
# Parameters:
66
# - The 10gen Ubuntu $repository to use
7+
# - The 10gen Ubuntu $package to use
78
#
89
# Sample Usage:
910
# include mongodb::params
@@ -12,9 +13,15 @@
1213
case $operatingsystemrelease {
1314
"10.04": {
1415
$repository="deb http://downloads.mongodb.org/distros/ubuntu 10.4 10gen"
16+
$package="mongodb-stable"
1517
}
1618
"10.10": {
1719
$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"
1825
}
1926
}
2027
}

0 commit comments

Comments
 (0)