knife-windows 1.1.3 → 1.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/knife-windows.gemspec +2 -3
- data/lib/chef/knife/bootstrap_windows_base.rb +14 -6
- data/lib/knife-windows/version.rb +1 -1
- data/spec/unit/knife/bootstrap_windows_winrm_spec.rb +36 -0
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 12b2f640d26c3299271d30e0b81efa2d3ba1baeb
|
4
|
+
data.tar.gz: 044058207473c385798cc53804bc868f9b95a518
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d97b93a2bee443dd25dfdc6581473372807d56ed25fa1b1de85a22c3833ebf071773dc0eab7aba35fc8dbf01a0e685095170f6dc37f5897ec778f162ee55ea75
|
7
|
+
data.tar.gz: 84a0ec562d1bc403475b0bc499e5f21e2b57135df36d9c095cbc150ced5e6bb63a37d792d0390086beea8f81bb195d73fc44998c256c042cca7359488dd72038
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,8 @@
|
|
1
1
|
# knife-windows Change Log
|
2
2
|
|
3
|
+
## Release 1.1.4
|
4
|
+
* Bumps winrm-s and winrm dependencies to address a winrm-s incompatibility bug with winrm 1.5
|
5
|
+
|
3
6
|
## Release 1.1.3
|
4
7
|
* [knife-windows #329](https://github.com/chef/knife-windows/pull/329) Pin to a minimum winrm-s of 0.3.2 addressing encoding issues in 0.3.1
|
5
8
|
|
data/knife-windows.gemspec
CHANGED
@@ -14,8 +14,8 @@ Gem::Specification.new do |s|
|
|
14
14
|
s.description = s.summary
|
15
15
|
|
16
16
|
s.required_ruby_version = ">= 1.9.1"
|
17
|
-
s.add_dependency "winrm", "~> 1.
|
18
|
-
s.add_dependency "winrm-s", "~> 0.3.
|
17
|
+
s.add_dependency "winrm", "~> 1.5"
|
18
|
+
s.add_dependency "winrm-s", "~> 0.3.4"
|
19
19
|
s.add_dependency "nokogiri"
|
20
20
|
|
21
21
|
s.add_development_dependency 'pry'
|
@@ -25,4 +25,3 @@ Gem::Specification.new do |s|
|
|
25
25
|
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
26
26
|
s.require_paths = ["lib"]
|
27
27
|
end
|
28
|
-
|
@@ -289,11 +289,13 @@ class Chef
|
|
289
289
|
|
290
290
|
STDOUT.sync = STDERR.sync = true
|
291
291
|
|
292
|
-
if (Chef::Config[:validation_key] && !File.exist?(File.expand_path(Chef::Config[:validation_key]))
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
292
|
+
if Chef::VERSION.split('.').first.to_i == 11 && Chef::Config[:validation_key] && !File.exist?(File.expand_path(Chef::Config[:validation_key]))
|
293
|
+
ui.error("Unable to find validation key. Please verify your configuration file for validation_key config value.")
|
294
|
+
exit 1
|
295
|
+
end
|
296
|
+
|
297
|
+
if (defined?(chef_vault_handler) && chef_vault_handler.doing_chef_vault?) ||
|
298
|
+
(Chef::Config[:validation_key] && !File.exist?(File.expand_path(Chef::Config[:validation_key])))
|
297
299
|
|
298
300
|
unless locate_config_value(:chef_node_name)
|
299
301
|
ui.error("You must pass a node name with -N when bootstrapping with user credentials")
|
@@ -301,7 +303,13 @@ class Chef
|
|
301
303
|
end
|
302
304
|
|
303
305
|
client_builder.run
|
304
|
-
|
306
|
+
|
307
|
+
if client_builder.respond_to?(:client)
|
308
|
+
chef_vault_handler.run(client_builder.client)
|
309
|
+
else
|
310
|
+
chef_vault_handler.run(node_name: config[:chef_node_name])
|
311
|
+
end
|
312
|
+
|
305
313
|
bootstrap_context.client_pem = client_builder.client_path
|
306
314
|
|
307
315
|
else
|
@@ -256,4 +256,40 @@ describe Chef::Knife::BootstrapWindowsWinrm do
|
|
256
256
|
end
|
257
257
|
end
|
258
258
|
end
|
259
|
+
|
260
|
+
context "when doing chef vault", :chef_gte_12_only do
|
261
|
+
let(:vault_handler) { double('vault_handler', :doing_chef_vault? => true) }
|
262
|
+
let(:node_name) { 'foo.example.com' }
|
263
|
+
before do
|
264
|
+
allow(bootstrap).to receive(:wait_for_remote_response)
|
265
|
+
allow(bootstrap).to receive(:create_bootstrap_bat_command)
|
266
|
+
allow(bootstrap).to receive(:run_command).and_return(0)
|
267
|
+
bootstrap.config[:chef_node_name] = node_name
|
268
|
+
bootstrap.chef_vault_handler = vault_handler
|
269
|
+
end
|
270
|
+
|
271
|
+
context "builder does not respond to client" do
|
272
|
+
before do
|
273
|
+
bootstrap.client_builder = instance_double("Chef::Knife::Bootstrap::ClientBuilder", :run => nil, :client_path => nil)
|
274
|
+
end
|
275
|
+
|
276
|
+
it "passes a node search query to the handler" do
|
277
|
+
expect(vault_handler).to receive(:run).with(node_name: node_name)
|
278
|
+
bootstrap.bootstrap
|
279
|
+
end
|
280
|
+
end
|
281
|
+
|
282
|
+
context "builder responds to client" do
|
283
|
+
let(:client) { Chef::ApiClient.new }
|
284
|
+
|
285
|
+
before do
|
286
|
+
bootstrap.client_builder = double("Chef::Knife::Bootstrap::ClientBuilder", :run => nil, :client_path => nil, :client => client)
|
287
|
+
end
|
288
|
+
|
289
|
+
it "passes a node search query to the handler" do
|
290
|
+
expect(vault_handler).to receive(:run).with(client)
|
291
|
+
bootstrap.bootstrap
|
292
|
+
end
|
293
|
+
end
|
294
|
+
end
|
259
295
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: knife-windows
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Seth Chisamore
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-01-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: winrm
|
@@ -16,28 +16,28 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '1.
|
19
|
+
version: '1.5'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '1.
|
26
|
+
version: '1.5'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: winrm-s
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 0.3.
|
33
|
+
version: 0.3.4
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 0.3.
|
40
|
+
version: 0.3.4
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: nokogiri
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|