gaptool-client 0.8.0.pre.beta4 → 0.8.0.pre.beta5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/gaptool_client/ssh.rb +16 -11
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cfff28ea314317791306b693214c18de592e63dd
|
4
|
+
data.tar.gz: 02349e3f68acd9c5e887f50bfbfac50ce9574903
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 373f6ad2b696e90c63471ac54a2f709e1360da404b37a1487097acb9d9b405271a455026d5ee7df53b47332fd07d6af47e000d52e0d8bf38b55892ff89748070
|
7
|
+
data.tar.gz: d9c0853b5f0feae5f233e7a4cf16a3ffa8136f28a0ecaa3438f700ff7d448438f4508a3691b862e9f4f6201f557c4377d01a5382a3a005d7cd1ca2274b4d4a7a
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.8.0-
|
1
|
+
0.8.0-beta5
|
data/lib/gaptool_client/ssh.rb
CHANGED
@@ -12,11 +12,14 @@ module Gaptool
|
|
12
12
|
START_MARKER = '###### GAPTOOL ######'
|
13
13
|
STOP_MARKER = '###### END GAPTOOL ######'
|
14
14
|
|
15
|
+
def self.ssh_identity
|
16
|
+
@ssh_id ||= if ENV['GT_SSH_KEY']
|
17
|
+
File.realpath(File.expand_path(ENV['GT_SSH_KEY']))
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
15
21
|
def self.config_for(node)
|
16
|
-
key = if
|
17
|
-
path = File.realpath(File.expand_path(ENV['GT_SSH_KEY']))
|
18
|
-
"\n IdentityFile #{path}"
|
19
|
-
end
|
22
|
+
key = "\n IdentityFile #{ssh_identity}" if ssh_identity
|
20
23
|
host = Gaptool::API.get_host(node)
|
21
24
|
<<-EOF
|
22
25
|
# -- #{node['instance']}
|
@@ -83,15 +86,17 @@ EOF
|
|
83
86
|
|
84
87
|
def self.configure_sshkit(opts = {})
|
85
88
|
SSHKit.config.output_verbosity = opts[:log_level] || Logger::WARN
|
89
|
+
opts = {
|
90
|
+
forward_agent: true,
|
91
|
+
global_known_hosts_file: '/dev/null',
|
92
|
+
keys_only: true,
|
93
|
+
port: 22,
|
94
|
+
user: ENV['GT_USER']
|
95
|
+
}
|
96
|
+
opts[:keys] = [ssh_identity] if ssh_identity
|
86
97
|
SSHKit::Backend::Netssh.configure do |ssh|
|
87
98
|
ssh.connection_timeout = 30
|
88
|
-
ssh.ssh_options =
|
89
|
-
forward_agent: true,
|
90
|
-
global_known_hosts_file: '/dev/null',
|
91
|
-
keys_only: true,
|
92
|
-
port: 22,
|
93
|
-
user: ENV['GT_USER']
|
94
|
-
}
|
99
|
+
ssh.ssh_options = opts
|
95
100
|
end
|
96
101
|
end
|
97
102
|
|