capistrano-ec2 0.1.1 → 0.1.2

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: a7dc2b8b577ea231f82ab8cd754e8ff14ce23405
4
- data.tar.gz: 7c93307863fdfd49fb88b4fbf086ae4203903828
3
+ metadata.gz: ade641a736b75057363c695506044ce6d43423b1
4
+ data.tar.gz: 5529079ece7660d3f6b005ef77b36d4d2154c3e5
5
5
  SHA512:
6
- metadata.gz: 48a037205ff2106f2640cec302496b18cfb4b708d5ba03cfea0aefbe725d67a399704a8e2e012f7e9e2e0d1a95b0c74f7a2c9d763b0a0e6dee825d6843ac98df
7
- data.tar.gz: afeae7476d8e9580db81e834acdb8281976249d1354d4e9e18589eb727b7729a5cb4111ce0579246ff6815d719e0e3c243fb3329258d39716407e4a07c50b318
6
+ metadata.gz: 44ff70b25f147cf4e413caaa796eaaf10b558be61f470cf624975c6fb7366b1fab3b423182731c24a0d5179a5fec29e4c57753bb32177759b681fd636a912342
7
+ data.tar.gz: 19ddbb15384f1ea46422eb64bb0a7a3f5cd50c372fab7058631cd540e497edf87dbb2df8c6408915346fc0c990141ac8214fd370ce136c92ae2e665040ce36c2
data/README.md CHANGED
@@ -37,6 +37,9 @@ default:
37
37
  aws_secret_access_key: <YOUR_SECRET_ACCESS_KEY>
38
38
  ```
39
39
 
40
+ As an alternative to directly using credentials, you can also use IAM instance profiles by
41
+ setting `:use_iam_profile` to `true` in the deploy configuration.
42
+
40
43
  **Usage:**
41
44
 
42
45
  Tag your EC2 instances so you can target specific servers in your Capistrano configuration.
@@ -3,11 +3,16 @@ require 'fog/aws'
3
3
  module Capistrano
4
4
  class Configuration
5
5
  def for_each_ec2_server(ec2_env:, ec2_role:, &block)
6
- ec2 = Fog::Compute.new(provider: 'AWS', region: fetch(:region))
6
+ ec2 = Fog::Compute.new \
7
+ provider: 'AWS',
8
+ region: fetch(:region),
9
+ use_iam_profile: fetch(:use_iam_profile, false)
7
10
 
8
11
  filters = { "tag:ec2_env" => ec2_env, "tag:role" => ec2_role }
9
12
 
10
13
  ec2.servers.all(filters).map.with_index do |ec2_server, index|
14
+ next unless ec2_server.ready?
15
+
11
16
  yield ec2_server, index
12
17
  end
13
18
  end
@@ -1,5 +1,5 @@
1
1
  module Capistrano
2
2
  module Ec2
3
- VERSION = "0.1.1"
3
+ VERSION = "0.1.2"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano-ec2
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tom de Vries
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-07-19 00:00:00.000000000 Z
11
+ date: 2017-03-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: capistrano
@@ -121,7 +121,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
121
121
  version: '0'
122
122
  requirements: []
123
123
  rubyforge_project:
124
- rubygems_version: 2.6.6
124
+ rubygems_version: 2.5.2
125
125
  signing_key:
126
126
  specification_version: 4
127
127
  summary: A Capistrano patch to simplify deployment to Amazon EC2.