knife-ec2 1.0.17 → 1.0.18

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
  SHA256:
3
- metadata.gz: e33ffae143dd991452c5c1dc7fce4ec921053cae8072accf212d57acc3f964cf
4
- data.tar.gz: 9a81e3780a4a27e79dded1ed55a7da645220847577fab770c91279485eed53d7
3
+ metadata.gz: 7f0efb7449ec88881f143653d3bb282ca3d0e4e682773487cd17c4943e6631b9
4
+ data.tar.gz: c89dfbbbb331f2258af0797273a58e77f13a321d62b17ec58346f07139fb27a9
5
5
  SHA512:
6
- metadata.gz: 4d83c87ad3197f86932377a362e7edd615608f24cbd2a00935b1587810b39e1273bacd49ec7707ccac3c5b7e7fd25d77425acfd7b07c1077d7c43182245a7526
7
- data.tar.gz: 5142010c2db7c748237c9d1dfcc9a8d21f27ca81ead0afa098742c3a1b248eef6d22d027f1140b02c4be0313356f0a862cf85268887ebb2aba6b6e36afd1465d
6
+ metadata.gz: 19f0cfcf4ced0fadfc2763cab088c15faa743f932f334fd8ffdd869c011284b32e281576cfaa3195e1a6b4fd97f7cf28bd29f1142b5983e8fba33ad7ed707830
7
+ data.tar.gz: ba73cea8ba3d9baed0553ed7dca881e3b4756b8324015a99672937e0cbb7ba4dc0c00412200ffb21db61a15ec1090dbc5b9d1d9d49a197289c9dfcaef58585ba
@@ -1,3 +1,4 @@
1
+
1
2
  #
2
3
  # Author:: Seth Chisamore (<schisamo@chef.io>)
3
4
  # Copyright:: Copyright (c) 2011-2019 Chef Software, Inc.
@@ -67,8 +68,7 @@ class Chef
67
68
  option :region,
68
69
  long: "--region REGION",
69
70
  description: "Your AWS region",
70
- proc: Proc.new { |key| Chef::Config[:knife][:region] = key },
71
- default: "us-east-1"
71
+ proc: Proc.new { |key| Chef::Config[:knife][:region] = key }
72
72
 
73
73
  option :use_iam_profile,
74
74
  long: "--use-iam-profile",
@@ -81,8 +81,8 @@ class Chef
81
81
 
82
82
  def connection_string
83
83
  conn = {}
84
- conn[:region] = locate_config_value(:region)
85
- Chef::Log.debug "Using AWS region #{locate_config_value(:region)}"
84
+ conn[:region] = locate_config_value(:region) || "us-east-1"
85
+ Chef::Log.debug "Using AWS region #{conn[:region]}"
86
86
  conn[:credentials] =
87
87
  if locate_config_value(:use_iam_profile)
88
88
  Chef::Log.debug "Using iam profile for authentication as use_iam_profile set"
@@ -145,7 +145,6 @@ class Chef
145
145
  %w{ebs_optimized image_id instance_id instance_type key_name platform public_dns_name public_ip_address private_dns_name private_ip_address root_device_type}.each do |id|
146
146
  server_data[id] = server_obj.instances[0].send(id)
147
147
  end
148
-
149
148
  server_data["availability_zone"] = server_obj.instances[0].placement.availability_zone
150
149
  server_data["groups"] = server_obj.groups.map(&:name)
151
150
  server_data["iam_instance_profile"] = ( server_obj.instances[0].iam_instance_profile.nil? ? nil : server_obj.instances[0].iam_instance_profile.arn[%r{instance-profile/(.*)}] )
@@ -204,7 +203,6 @@ class Chef
204
203
  errors = [] # track all errors so we report on all of them
205
204
 
206
205
  validate_aws_config_file! if locate_config_value(:aws_config_file)
207
-
208
206
  unless locate_config_value(:use_iam_profile) # skip config file / key validation if we're using iam profile
209
207
  # validate the creds file if:
210
208
  # aws keys have not been passed in config / CLI and the default cred file location does exist
@@ -331,7 +329,6 @@ class Chef
331
329
  profile = locate_config_value(:aws_profile)
332
330
 
333
331
  Chef::Log.debug "Using AWS profile #{profile}"
334
-
335
332
  entries = if aws_creds.values.first.key?("AWSAccessKeyId")
336
333
  aws_creds.values.first
337
334
  else
@@ -1,6 +1,6 @@
1
1
  module Knife
2
2
  module Ec2
3
- VERSION = "1.0.17".freeze
3
+ VERSION = "1.0.18".freeze
4
4
  MAJOR, MINOR, TINY = VERSION.split(".")
5
5
  end
6
6
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: knife-ec2
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.17
4
+ version: 1.0.18
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chef Software, Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-11-21 00:00:00.000000000 Z
11
+ date: 2019-12-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: chef