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 +4 -4
- data/lib/chef/knife/ec2_base.rb +1 -1
- data/lib/chef/knife/ec2_server_create.rb +6 -6
- data/lib/knife-ec2/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2a3fdcffedb74d76729664d669caf940e0db52d409d1446a59ecab5a99f7e964
|
4
|
+
data.tar.gz: 772b31f6f5fbe26aa79df7901800a70a0df966bb79c4d12424404d004a8d0c20
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f10320284eb70e6bd330e2ae6d2a5c34a6fdbae7ebf44fd96b30b18dee17fb760f7bdb6e73bd5e18f180230172fd646a49aad70ab617192f447e656081fdd5e2
|
7
|
+
data.tar.gz: 446c213c86fb0109072137940c064c309f1b60b6cd2eab7c2470dd3f0ed3fc72a5fc98132810b1ffacb9e71d3eda89d4ccf1b483210e3644388d9727efaba41a
|
data/lib/chef/knife/ec2_base.rb
CHANGED
@@ -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] ||=
|
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(
|
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
|
1392
|
-
return @
|
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
|
-
@
|
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(
|
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
|
data/lib/knife-ec2/version.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2019-12-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: chef
|