chef-provisioning-aws 1.2.0 → 1.2.1
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 09d8cd1f113c14f6f206a03b49d89cae4d9294a6
|
4
|
+
data.tar.gz: 0fbe0de96accf8f7cc030920f108f1a68df09ece
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b5d93a2add78c31d46ced5badef87b3ead4da4fb203b2b00352f15e569e309afc1d2ccc87a2bf2c2f2468f5e02de64908144d0f577a983e7462b17170f2eae51
|
7
|
+
data.tar.gz: 37d9e8b8c2461bcf26a8488127a3ab241c0e731bc7ad3e3dd98f4e892906d8bb8d8b94dc2d9a07da9bdca2841c2f642f65bbb319a64a15c1283bb2aa7f084f64
|
@@ -235,6 +235,7 @@ class AWSProvider < Chef::Provider::LWRPBase
|
|
235
235
|
# @param aws_object Aws SDK Object to update tags
|
236
236
|
#
|
237
237
|
def converge_tags(aws_object)
|
238
|
+
return unless new_resource.respond_to?(:aws_tags)
|
238
239
|
desired_tags = new_resource.aws_tags
|
239
240
|
# If aws_tags were not provided we exit
|
240
241
|
if desired_tags.nil?
|
@@ -437,11 +437,9 @@ EOD
|
|
437
437
|
Chef::Log.debug "Creating instance with bootstrap options #{bootstrap_options}"
|
438
438
|
|
439
439
|
actual_instance = ec2.instances.create(bootstrap_options.to_hash)
|
440
|
-
|
441
440
|
# Make sure the instance is ready to be tagged
|
442
|
-
|
443
|
-
|
444
|
-
end
|
441
|
+
wait_until_taggable(actual_instance)
|
442
|
+
|
445
443
|
# TODO add other tags identifying user / node url (same as fog)
|
446
444
|
actual_instance.tags['Name'] = machine_spec.name
|
447
445
|
actual_instance.source_dest_check = machine_options[:source_dest_check] if machine_options.has_key?(:source_dest_check)
|
@@ -1005,6 +1003,7 @@ EOD
|
|
1005
1003
|
parallelizer.parallelize(1.upto(num_servers)) do |i|
|
1006
1004
|
clean_bootstrap_options = Marshal.load(Marshal.dump(bootstrap_options))
|
1007
1005
|
instance = ec2.instances.create(clean_bootstrap_options.to_hash)
|
1006
|
+
wait_until_taggable(instance)
|
1008
1007
|
|
1009
1008
|
yield instance if block_given?
|
1010
1009
|
instance
|
@@ -1048,6 +1047,12 @@ EOD
|
|
1048
1047
|
end
|
1049
1048
|
end
|
1050
1049
|
|
1050
|
+
def wait_until_taggable(instance)
|
1051
|
+
Retryable.retryable(:tries => 12, :sleep => 5, :on => [AWS::EC2::Errors::InvalidInstanceID::NotFound, TimeoutError]) do
|
1052
|
+
raise TimeoutError unless instance.status == :pending || instance.status == :running
|
1053
|
+
end
|
1054
|
+
end
|
1055
|
+
|
1051
1056
|
def get_listeners(listeners)
|
1052
1057
|
case listeners
|
1053
1058
|
when Hash
|
@@ -155,6 +155,12 @@ describe "AWS Tagged Items" do
|
|
155
155
|
).and be_idempotent
|
156
156
|
end
|
157
157
|
|
158
|
+
it "does not error when a class does not define #aws_tags" do
|
159
|
+
expect_recipe {
|
160
|
+
aws_eip_address 'test_address'
|
161
|
+
}.to create_an_aws_eip_address('test_address')
|
162
|
+
end
|
163
|
+
|
158
164
|
end
|
159
165
|
end
|
160
166
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: chef-provisioning-aws
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- John Ewart
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-05-
|
11
|
+
date: 2015-05-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: chef
|