amirotate 0.0.10 → 0.0.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/amirotate/client.rb +5 -5
- data/lib/amirotate/version.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: 07ce6ceec68ddaee6f70080a7ff8a85ca5a48963
|
4
|
+
data.tar.gz: b9df138b769f85b61e19ac28e703c8126ba837a3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 082e46a715249dc101c3bd6ad9d544def2febdcd9981d9253fe457e43e31371be8e22ca1fa5bace2b38475a63e01605151e33dae15f27c8835ee4319c91f9860
|
7
|
+
data.tar.gz: 9dc9bffd39a33a37e07370c6e86d9a9fc832642a700dc3a47c033fab05239d4ba80e4eb3c5006344957d270c38f73ea3f9cd4b4ce131ffc73e5469999ba9dd52
|
data/lib/amirotate/client.rb
CHANGED
@@ -52,17 +52,17 @@ module AMIRotate
|
|
52
52
|
tag_key = "amirotate:#{@cli_options[:profile_name]}:retention_period"
|
53
53
|
tag = instance.tags.find {|tag| tag.key == tag_key}
|
54
54
|
|
55
|
-
if tag.nil?
|
56
|
-
logger.info "Tag `#{tag_key}` is not set on instance #{instance.instance_id} (#{name}). Skipping."
|
57
|
-
next
|
58
|
-
end
|
59
|
-
|
60
55
|
name = begin
|
61
56
|
instance.tags.find {|tag| tag.key == "Name"}.value
|
62
57
|
rescue
|
63
58
|
""
|
64
59
|
end
|
65
60
|
|
61
|
+
if tag.nil?
|
62
|
+
logger.info "Tag `#{tag_key}` is not set on instance #{instance.instance_id} (#{name}). Skipping."
|
63
|
+
next
|
64
|
+
end
|
65
|
+
|
66
66
|
logger.info "Create image from instance #{instance.instance_id} (#{name}). Retention period is #{tag.value}."
|
67
67
|
|
68
68
|
begin
|
data/lib/amirotate/version.rb
CHANGED