awful 0.0.9 → 0.0.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/awful/auto_scaling.rb +11 -0
- data/lib/awful/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2eeb60b2be1a2adadd261542d168d8f50466fd59
|
4
|
+
data.tar.gz: 465c2accff6e8f971c2e8440d1f14394ee94703d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 879ebf772b7020f5a7e6e76849404db529374444933304a3e2f7116c308ea33cf6b6c144ab7e62911ca61df6c3fcb423accc5053a7312588d622914dcaa577ba
|
7
|
+
data.tar.gz: f1ebce72e9fbd9b63be4f71335273d71a43e203d5d665b282e27c333667d114d485e2cc69df58f53d96bd2a6630b6e24aee8200e3f7c22b6399669a165d50b2f
|
data/lib/awful/auto_scaling.rb
CHANGED
@@ -69,6 +69,17 @@ module Awful
|
|
69
69
|
end
|
70
70
|
end
|
71
71
|
|
72
|
+
desc 'ssh NAME [ARGS]', 'ssh to an instance for this autoscaling group'
|
73
|
+
method_option :all, aliases: '-a', default: false, desc: 'ssh to all instances'
|
74
|
+
method_option :number, aliases: '-n', default: 1, desc: 'number of instances to ssh'
|
75
|
+
def ssh(name, *args)
|
76
|
+
ips = ips(name).flatten
|
77
|
+
num = options[:all] ? ips.count : options[:number].to_i
|
78
|
+
ips.last(num).each do |ip|
|
79
|
+
system "ssh #{ip} #{Array(args).join(' ')}"
|
80
|
+
end
|
81
|
+
end
|
82
|
+
|
72
83
|
desc 'dump NAME', 'dump existing autoscaling group as yaml'
|
73
84
|
def dump(name)
|
74
85
|
asg = autoscaling.describe_auto_scaling_groups(auto_scaling_group_names: Array(name)).map(&:auto_scaling_groups).flatten.first.to_hash
|
data/lib/awful/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: awful
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ric Lister
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-04-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|