knife-ec2 1.0.20 → 1.0.21

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: b6444d46c88ab7fe3b303af2b9cb993633791d89d98a53690658ca5932825d29
4
- data.tar.gz: 00321d501e212ec768eb08357645d740f33abea1cd0b63c31e6fc2e9f7ab80dd
3
+ metadata.gz: 2a3fdcffedb74d76729664d669caf940e0db52d409d1446a59ecab5a99f7e964
4
+ data.tar.gz: 772b31f6f5fbe26aa79df7901800a70a0df966bb79c4d12424404d004a8d0c20
5
5
  SHA512:
6
- metadata.gz: 703b96ddffb5e8a282d37b6e730dbea8872d2fa9792d097e1315f6cfffea42ef14c6b87cda9b06089263f5a184f22f509c3e68783e30906cdc2fe74ac7c28279
7
- data.tar.gz: 278c42337c36b0dd30e3d5a7bfcd7a9976573545a6673bdea928197f1b27513f77a8e06d893492217c5f36ea05e8fd8d913f763a8b2d0ad38d40b404491fda63
6
+ metadata.gz: f10320284eb70e6bd330e2ae6d2a5c34a6fdbae7ebf44fd96b30b18dee17fb760f7bdb6e73bd5e18f180230172fd646a49aad70ab617192f447e656081fdd5e2
7
+ data.tar.gz: 446c213c86fb0109072137940c064c309f1b60b6cd2eab7c2470dd3f0ed3fc72a5fc98132810b1ffacb9e71d3eda89d4ccf1b483210e3644388d9727efaba41a
@@ -328,7 +328,7 @@ class Chef
328
328
 
329
329
  aws_creds = ini_parse(File.read(aws_cred_file_location))
330
330
  profile = locate_config_value(:aws_profile)
331
-
331
+ profile = "profile #{profile}" if profile != "default"
332
332
  Chef::Log.debug "Using AWS profile #{profile}"
333
333
  entries = if aws_creds.values.first.key?("AWSAccessKeyId")
334
334
  aws_creds.values.first
@@ -391,7 +391,7 @@ class Chef
391
391
  Chef::Config[:validation_key] = validation_key_path
392
392
  end
393
393
 
394
- config[:connection_protocol] ||= connection_protocol
394
+ config[:connection_protocol] ||= connection_protocol_ec2
395
395
  config[:connection_port] ||= connection_port
396
396
 
397
397
  # Check if Server is Windows or Linux
@@ -1369,7 +1369,7 @@ class Chef
1369
1369
 
1370
1370
  # TODO: connection_protocol and connection_port used to choose winrm/ssh or 5985/22 based on the image chosen
1371
1371
  def connection_port
1372
- port = config_value(:connection_port, knife_key_for_protocol(connection_protocol, :port))
1372
+ port = config_value(:connection_port, knife_key_for_protocol(connection_protocol_ec2, :port))
1373
1373
  return port if port
1374
1374
 
1375
1375
  assign_default_port
@@ -1388,19 +1388,19 @@ class Chef
1388
1388
 
1389
1389
  # url values override CLI flags, if you provide both
1390
1390
  # we'll use the one that you gave in the URL.
1391
- def connection_protocol
1392
- return @connection_protocol if @connection_protocol
1391
+ def connection_protocol_ec2
1392
+ return @connection_protocol_ec2 if @connection_protocol_ec2
1393
1393
 
1394
1394
  default_protocol = is_image_windows? ? "winrm" : "ssh"
1395
1395
 
1396
1396
  from_url = host_descriptor =~ %r{^(.*)://} ? $1 : nil
1397
1397
  from_cli = config[:connection_protocol]
1398
1398
  from_knife = Chef::Config[:knife][:connection_protocol]
1399
- @connection_protocol = from_url || from_cli || from_knife || default_protocol
1399
+ @connection_protocol_ec2 = from_url || from_cli || from_knife || default_protocol
1400
1400
  end
1401
1401
 
1402
1402
  def connection_user
1403
- @connection_user ||= config_value(:connection_user, knife_key_for_protocol(connection_protocol, :user))
1403
+ @connection_user ||= config_value(:connection_user, knife_key_for_protocol(connection_protocol_ec2, :user))
1404
1404
  end
1405
1405
 
1406
1406
  def server_name
@@ -1,6 +1,6 @@
1
1
  module Knife
2
2
  module Ec2
3
- VERSION = "1.0.20".freeze
3
+ VERSION = "1.0.21".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.20
4
+ version: 1.0.21
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-12-16 00:00:00.000000000 Z
11
+ date: 2019-12-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: chef