Sha256: 960785ad05c4fb253a25bbd99ed040bee046cc4428981226a7b564d5e4786dff

Contents?: true

Size: 1.25 KB

Versions: 1

Compression:

Stored size: 1.25 KB

Contents

Capistrano.configuration(:must_exist).load do
  
  # require 'deprec/third_party/vmbuilder/plugins/apt'

  # Package files for a rails  machine
  set :rails_ubuntu, {
  :base => %w(build-essential ntp-server mysql-server wget
              ruby irb ri rdoc ruby1.8-dev libmysql-ruby 
              zlib1g-dev zlib1g openssl libssl-dev subversion)
  }
  
  desc "enable universe repositories"
  task :enable_universe do
    # ruby is not installed by default or else we'd use 
    # sudo "ruby -pi.bak -e \"gsub(/#\s?(.*universe$)/, '\1')\" sources.list"
    sudo 'perl -pi -e \'s/#\s?(.*dapper universe$)/\1/g\' /etc/apt/sources.list'
    apt.update
  end
  
  desc "we don't want to get asked to insert cdrom"
  task :disable_cdrom_install do
    # ruby is not installed by default or else we'd use 
    # sudo "ruby -pi.bak -e \"gsub(/#\s?(.*universe$)/, '\1')\" sources.list"
    sudo 'perl -pi -e \'s/(deb cdrom)/#\1/g\' /etc/apt/sources.list'
    apt.update
  end
  
  desc "installs packages required for a rails box"
  task :install_packages_for_rails do
    apt.install(rails_ubuntu, :stable)  # install packages for rails box   
  end
  
  # XXX write function to enable/disable a service
  # XXX update-rc.d lighttpd remove
  # XXX update-rc.d -n httpd defaults
  
  
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
deprec-1.1.0 lib/deprec/recipes/ubuntu.rb