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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 92b70a21086b26bd51cfa3ffc8b209921f18cf13
4
- data.tar.gz: cdbfc2a8e6706e8b6376a10e690aa245d28fde79
3
+ metadata.gz: 2eeb60b2be1a2adadd261542d168d8f50466fd59
4
+ data.tar.gz: 465c2accff6e8f971c2e8440d1f14394ee94703d
5
5
  SHA512:
6
- metadata.gz: 05746b80eee6cccabd29818777eb98b96af940102c394d1d0cfed12e0821ea76a6eb94b2f82436437db008307eae2f705ff691277edc7a7b286bfa7b18634ad4
7
- data.tar.gz: 2b23230430ab531817edcf810b761f8749171082e815722c4a8c1443410932c3aeb80f5d3f2d9d8f951e8fa2ec3a399619366873ffe99fbc510164d8494a475d
6
+ metadata.gz: 879ebf772b7020f5a7e6e76849404db529374444933304a3e2f7116c308ea33cf6b6c144ab7e62911ca61df6c3fcb423accc5053a7312588d622914dcaa577ba
7
+ data.tar.gz: f1ebce72e9fbd9b63be4f71335273d71a43e203d5d665b282e27c333667d114d485e2cc69df58f53d96bd2a6630b6e24aee8200e3f7c22b6399669a165d50b2f
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Awful
2
- VERSION = "0.0.9"
2
+ VERSION = "0.0.10"
3
3
  end
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.9
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-03-27 00:00:00.000000000 Z
11
+ date: 2015-04-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler