Browse files

Added support for ubuntu 11.04

  • Loading branch information...
1 parent cc08c73 commit ec6ef67313e3674539a416afb7adfdd936bc5d05 @mattmcmanus mattmcmanus committed Oct 14, 2011
Showing with 11 additions and 4 deletions.
  1. +4 −4 manifests/init.pp
  2. +7 −0 manifests/params.pp
View
8 manifests/init.pp
@@ -23,7 +23,7 @@
exec { "10gen-apt-repo":
path => "/bin:/usr/bin",
- command => "add-apt-repository '${mongodb::params::repository}'",
+ command => "echo '${mongodb::params::repository}' >> /etc/apt/sources.list",
unless => "cat /etc/apt/sources.list | grep 10gen",
require => Package["python-software-properties"],
}
@@ -42,23 +42,23 @@
require => Exec["10gen-apt-key"],
}
- package { "mongodb-stable":
+ package { $mongodb::params::package:
ensure => installed,
require => Exec["update-apt"],
}
service { "mongodb":
enable => true,
ensure => running,
- require => Package["mongodb-stable"],
+ require => Package[$mongodb::params::package],
}
define replica_set {
file { "/etc/init/mongodb.conf":
content => template("mongodb/mongodb.conf.erb"),
mode => "0644",
notify => Service["mongodb"],
- require => Package["mongodb-stable"],
+ require => Package[$mongodb::params::package],
}
}
}
View
7 manifests/params.pp
@@ -4,6 +4,7 @@
#
# Parameters:
# - The 10gen Ubuntu $repository to use
+# - The 10gen Ubuntu $package to use
#
# Sample Usage:
# include mongodb::params
@@ -12,9 +13,15 @@
case $operatingsystemrelease {
"10.04": {
$repository="deb http://downloads.mongodb.org/distros/ubuntu 10.4 10gen"
+ $package="mongodb-stable"
}
"10.10": {
$repository="deb http://downloads.mongodb.org/distros/ubuntu 10.10 10gen"
+ $package="mongodb-stable"
+ }
+ "11.04": {
+ $repository="deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen"
+ $package="mongodb-10gen"
}
}
}

0 comments on commit ec6ef67

Please sign in to comment.