Module: MultiServer

Defined in:
lib/cap-hacks/plugins/multiserver.rb

Instance Method Summary collapse

Instance Method Details

#define(name, host, options = {}) ⇒ Object



7
8
9
10
11
12
13
14
15
16
17
# File 'lib/cap-hacks/plugins/multiserver.rb', line 7

def define(name, host, options={})
  options = {:roles => [:app, :web]}.merge(options)
  
  desc "Add #{name} to servers to perform subsequent tasks on"
  task(name) do
    options.delete(:roles).each do |r|
      role(r, host, options)
    end
  end
  
end