Sha256: 5c4884e0edfeaa90314e3611668f69bc9d9783fa1d63dc9e2339cd9ee0647229
Contents?: true
Size: 1.22 KB
Versions: 10
Compression:
Stored size: 1.22 KB
Contents
namespace :rubber do namespace :mongodb do rubber.allow_optional_tasks(self) before "rubber:install_packages", "rubber:mongodb:install" after "rubber:install_packages", "rubber:mongodb:setup_paths" task :install, :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!(/^ */, '') put(sources, "/etc/apt/sources.list.d/mongodb.list") rsudo "apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10" end task :setup_paths, :roles => :mongodb do rsudo "mkdir -p #{rubber_env.mongodb_data_dir}" rsudo "chown -R mongodb:mongodb #{rubber_env.mongodb_data_dir}" end desc <<-DESC Starts the mongodb daemon DESC task :start, :roles => :mongodb do rsudo "service mongodb start" end desc <<-DESC Stops the mongodb daemon DESC task :stop, :roles => :mongodb do rsudo "service mongodb stop" end desc <<-DESC Restarts the mongodb daemon DESC task :restart, :roles => :mongodb do rsudo "service mongodb restart" end end end
Version data entries
10 entries across 5 versions & 1 rubygems