ridley 1.1.0 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/ridley/host_connector/ssh.rb +15 -1
- data/lib/ridley/version.rb +1 -1
- metadata +3 -3
@@ -48,14 +48,28 @@ module Ridley
|
|
48
48
|
ssh.loop
|
49
49
|
end
|
50
50
|
}
|
51
|
+
rescue Net::SSH::AuthenticationFailed => ex
|
52
|
+
response.exit_code = -1
|
53
|
+
response.stderr = "Authentication failure for user #{ex}"
|
54
|
+
rescue Net::SSH::ConnectionTimeout, Timeout::Error
|
55
|
+
response.exit_code = -1
|
56
|
+
response.stderr = "Connection timed out"
|
57
|
+
rescue Errno::EHOSTUNREACH
|
58
|
+
response.exit_code = -1
|
59
|
+
response.stderr = "Host unreachable"
|
60
|
+
rescue Errno::ECONNREFUSED
|
61
|
+
response.exit_code = -1
|
62
|
+
response.stderr = "Connection refused"
|
51
63
|
rescue Net::SSH::Exception => ex
|
52
64
|
response.exit_code = -1
|
53
|
-
response.stderr = ex.
|
65
|
+
response.stderr = ex.inspect
|
54
66
|
end
|
55
67
|
|
56
68
|
case response.exit_code
|
57
69
|
when 0
|
58
70
|
log.info "Successfully ran SSH command on: '#{host}' as: '#{options[:ssh][:user]}'"
|
71
|
+
when -1
|
72
|
+
log.info "Failed to run SSH command on: '#{host}' as: '#{options[:ssh][:user]}'"
|
59
73
|
else
|
60
74
|
log.info "Successfully ran SSH command on: '#{host}' as: '#{options[:ssh][:user]}' but it failed"
|
61
75
|
end
|
data/lib/ridley/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ridley
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2013-06-
|
13
|
+
date: 2013-06-13 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: addressable
|
@@ -404,7 +404,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
404
404
|
version: '0'
|
405
405
|
segments:
|
406
406
|
- 0
|
407
|
-
hash:
|
407
|
+
hash: 3482897394780446934
|
408
408
|
requirements: []
|
409
409
|
rubyforge_project:
|
410
410
|
rubygems_version: 1.8.23
|