Module: Madeira::Provisioner::Capistrano

Extended by:
Capistrano
Included in:
Capistrano
Defined in:
lib/madeira/provisioner/capistrano.rb

Instance Method Summary collapse

Instance Method Details

#bootstrap(opts = {}) ⇒ Object



9
10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/madeira/provisioner/capistrano.rb', line 9

def bootstrap(opts={})
  config = ::Capistrano::Configuration.new
  config.logger.level = ::Capistrano::Logger::TRACE
  config.load "#{ENV['HOME']}/madeira/bootstrap.rb"

  config.default_run_options[:pty] = true

  #TODO: find better way of parsing options to cap tasks
  #
  ENV['HOSTS'] = opts[:dns_name]

  puts "\nbootstrapping #{ENV['HOSTS']}....."
  config.bootstrap
end