opzworks 0.3.3 → 0.3.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/opzworks/commands/ssh.rb +15 -9
- data/lib/opzworks/meta.rb +1 -1
- 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: 83bf02242ab0c6ce1bbdada77d52bfe7950a0e2e
|
4
|
+
data.tar.gz: 2c227652c0bfffb9d0a4ef31e87ddea8502332c8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1f53f15687081918bbd33d4f9a5a8ba309ddbee9df6532c4c015dd200ee71fb76775446f7921b254896ed3040a9235481ff24f4b00ee7208a289731d47cbc4f6
|
7
|
+
data.tar.gz: 2e025f3a38effbe2ed4d783e37aee44bcf7761187acf8e19ddb2cf4b51682892f7f4793709fc79614b2d49eccd1d72f63870e61e5e8cbc82ea890011f02b94fc
|
data/CHANGELOG.md
CHANGED
@@ -28,6 +28,7 @@ module OpzWorks
|
|
28
28
|
opt :backup, 'Backup old SSH config before updating'
|
29
29
|
opt :quiet, 'Use SSH LogLevel quiet', default: true
|
30
30
|
opt :private, 'Use private ips to populate SSH config, rather than public', default: false
|
31
|
+
opt :raw, 'Return only raw IPs rather than .ssh/config format output', default: false
|
31
32
|
end
|
32
33
|
|
33
34
|
config = OpzWorks.config
|
@@ -61,16 +62,21 @@ module OpzWorks
|
|
61
62
|
else
|
62
63
|
instance[:elastic_ip].nil? ? ip = instance[:public_ip] : ip = instance[:elastic_ip]
|
63
64
|
end
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
65
|
+
|
66
|
+
if options[:raw]
|
67
|
+
puts ip
|
68
|
+
else
|
69
|
+
parameters = {
|
70
|
+
'Host' => "#{instance[:hostname]}-#{stack_name}",
|
71
|
+
'HostName' => ip,
|
72
|
+
'User' => config.ssh_user_name
|
73
|
+
}
|
74
|
+
parameters['LogLevel'] = 'quiet' if options[:quiet]
|
75
|
+
parameters.map { |param| param.join(' ') }.join("\n ")
|
76
|
+
end
|
71
77
|
end
|
72
78
|
|
73
|
-
new_contents = "#{instances.join("\n")}\n"
|
79
|
+
new_contents = "#{instances.join("\n")}\n" unless options[:raw]
|
74
80
|
|
75
81
|
if options[:update]
|
76
82
|
ssh_config = "#{ENV['HOME']}/.ssh/config"
|
@@ -91,7 +97,7 @@ module OpzWorks
|
|
91
97
|
|
92
98
|
puts "Successfully updated #{ssh_config} with #{instances.length} instances!"
|
93
99
|
else
|
94
|
-
puts new_contents.strip
|
100
|
+
puts new_contents.strip unless options[:raw]
|
95
101
|
end
|
96
102
|
end
|
97
103
|
end
|
data/lib/opzworks/meta.rb
CHANGED