lib/rubber/recipes/rubber.rb in axtro-rubber-1.2.3 vs lib/rubber/recipes/rubber.rb in axtro-rubber-1.5.7
- old
+ new
@@ -48,16 +48,22 @@
required_task :init do
set :rubber_cfg, Rubber::Configuration.get_configuration(RUBBER_ENV)
set :rubber_env, rubber_cfg.environment.bind()
set :rubber_instances, rubber_cfg.instance
+ # Disable connecting to any Windows instance.
+ # pass -l to bash in :shell to that run also gets full env
+ # use a pty so we don't get "stdin: is not a tty" error output
+ set :default_run_options, :pty => true, :shell => "/bin/bash -l", :except => { :platform => 'windows' }
+
set :cloud, Rubber::Cloud::get_provider(rubber_env.cloud_provider || "aws", rubber_env, self)
load_roles() unless rubber_env.disable_auto_roles
# NOTE: for some reason Capistrano requires you to have both the public and
# the private key in the same folder, the public key should have the
# extension ".pub".
ssh_options[:keys] = rubber_env.cloud_providers[rubber_env.cloud_provider].key_file
+ ssh_options[:timeout] = fetch(:ssh_timeout, 5)
end
# Automatically load and define capistrano roles from instance config
def load_roles