Permalink
Browse files

Use sudo_script to add 10gen mongodb apt source.

  • Loading branch information...
1 parent 14c4250 commit 49aaf623a3c71ab9efada6a645101fc977046dee @ariejan committed Mar 28, 2012
Showing with 4 additions and 7 deletions.
  1. +4 −7 templates/mongodb/config/rubber/deploy-mongodb.rb
@@ -1,4 +1,3 @@
-
namespace :rubber do
namespace :mongodb do
@@ -9,12 +8,10 @@
task :setup_apt_sources, :roles => :mongodb do
# Setup apt sources to mongodb from 10gen
- sources = <<-SOURCES
- deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen
- SOURCES
- sources.gsub!(/^[ \t]*/, '')
- put(sources, "/etc/apt/sources.list.d/mongodb.list")
- rsudo "apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10"
+ rubber.sudo_script "install_mongodb", <<-ENDSCRIPT
+ echo "deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen" > /etc/apt/sources.list.d/mongodb.list
+ apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10
+ ENDSCRIPT
end
after "rubber:bootstrap", "rubber:mongodb:bootstrap"

0 comments on commit 49aaf62

Please sign in to comment.