knife-windows 1.9.1 → 1.9.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +43 -18
- data/knife-windows.gemspec +1 -1
- data/lib/chef/knife/bootstrap/windows-chef-client-msi.erb +19 -6
- data/lib/chef/knife/core/windows_bootstrap_context.rb +20 -0
- data/lib/chef/knife/winrm_base.rb +1 -1
- data/lib/knife-windows/version.rb +1 -1
- data/spec/data/client.d_00/00-foo.rb +2 -0
- data/spec/data/client.d_00/foo/bar.rb +1 -0
- data/spec/data/client.d_01/foo/bar.rb +1 -0
- data/spec/spec_helper.rb +30 -1
- data/spec/unit/knife/bootstrap_options_spec.rb +10 -0
- data/spec/unit/knife/bootstrap_template_spec.rb +41 -0
- data/spec/unit/knife/winrm_spec.rb +3 -3
- metadata +9 -9
- data/.gitignore +0 -5
- data/.rspec +0 -3
- data/.travis.yml +0 -29
- data/DOC_CHANGES.md +0 -22
- data/RELEASE_NOTES.md +0 -17
- data/appveyor.yml +0 -36
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3bf0c4e742d3b1f2c96348ae916c2c6521d61a41f316077c91a66639b1370279
|
|
4
|
+
data.tar.gz: 11d10a40bb240102a06ae7fd8603afd3bb6bf231dd25e364b5126bd9046a6e2c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f07208ca07546853389ab4c7646b4cfdaca43cfb39b90fe86cccc73d286a4b07a9e3015a89d2a734e25fec99c37122446c67519dc40cd806f05b4e11f7e15b3f
|
|
7
|
+
data.tar.gz: 3d81398062e1f4393072f172f8cc7bdb44a92c7f2cbd4db72305cf74b1b38a14a3c4dc7f9b1b00a8173eb53612084d97f32b2cdecb58474cf0d22ce00e67eee9
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,30 @@
|
|
|
1
1
|
# knife-windows Change Log
|
|
2
2
|
|
|
3
|
+
Note: this log contains only changes from knife-windows release 0.6.0 and later
|
|
4
|
+
-- it does not contain the changes from prior releases. To view change history
|
|
5
|
+
prior to release 0.6.0, please visit the [source repository](https://github.com/chef/knife-windows/commits).
|
|
6
|
+
|
|
7
|
+
<!-- latest_release 1.9.6 -->
|
|
8
|
+
## [v1.9.6](https://github.com/chef/knife-windows/tree/v1.9.6) (2018-10-23)
|
|
9
|
+
|
|
10
|
+
#### Merged Pull Requests
|
|
11
|
+
- Slim down the size of the install and the gem [#462](https://github.com/chef/knife-windows/pull/462) ([tas50](https://github.com/tas50))
|
|
12
|
+
<!-- latest_release -->
|
|
13
|
+
|
|
14
|
+
<!-- release_rollup since=1.9.1 -->
|
|
15
|
+
### Changes since 1.9.1 release
|
|
16
|
+
|
|
17
|
+
#### Merged Pull Requests
|
|
18
|
+
- Slim down the size of the install and the gem [#462](https://github.com/chef/knife-windows/pull/462) ([tas50](https://github.com/tas50)) <!-- 1.9.6 -->
|
|
19
|
+
- Adds client_d support to knife-windows [#461](https://github.com/chef/knife-windows/pull/461) ([btm](https://github.com/btm)) <!-- 1.9.5 -->
|
|
20
|
+
- MSYS-831 : Fixed windows detection code for windows 2016, windows 2012r2 [#455](https://github.com/chef/knife-windows/pull/455) ([piyushawasthi](https://github.com/piyushawasthi)) <!-- 1.9.4 -->
|
|
21
|
+
- [MSYS-841]fix bootstrap template short name [#457](https://github.com/chef/knife-windows/pull/457) ([dheerajd-msys](https://github.com/dheerajd-msys)) <!-- 1.9.3 -->
|
|
22
|
+
- [MSYS-850] enable expeditor [#458](https://github.com/chef/knife-windows/pull/458) ([dheerajd-msys](https://github.com/dheerajd-msys)) <!-- 1.9.2 -->
|
|
23
|
+
<!-- release_rollup -->
|
|
24
|
+
|
|
25
|
+
<!-- latest_stable_release -->
|
|
26
|
+
<!-- latest_stable_release -->
|
|
27
|
+
|
|
3
28
|
## Release 1.9.1 (2018-03-07)
|
|
4
29
|
|
|
5
30
|
* [knife-windows #444](https://github.com/chef/knife-windows/pull/444) Fixes issue when bootstrapping windows systems failing with the message: The input line is too long.
|
|
@@ -87,18 +112,18 @@
|
|
|
87
112
|
* [knife-windows #213](https://github.com/chef/knife-windows/pull/213) Search possibilities of HOME for bootstrap templates
|
|
88
113
|
* [knife-windows #206](https://github.com/chef/knife-windows/pull/206) Add a flag msi_url that allows one to fetch the Chef client msi from a non-chef.io path
|
|
89
114
|
* [knife-windows #192](https://github.com/chef/knife-windows/issues/192) deprecate knife bootstrap --distro
|
|
90
|
-
* [knife-windows #159](https://github.com/
|
|
115
|
+
* [knife-windows #159](https://github.com/chef/knife-windows/issues/159) `winrm_port` option should default to 5986 if `winrm_transport` option is `ssl`
|
|
91
116
|
* [knife-windows #149](https://github.com/chef/knife-windows/pull/149) Adding knife wsman test to validate WSMAN/WinRM availability
|
|
92
|
-
* [knife-windows #139](https://github.com/
|
|
93
|
-
* [knife-windows #126](https://github.com/
|
|
94
|
-
* [knife-windows #154](https://github.com/
|
|
95
|
-
* [knife-windows #143](https://github.com/
|
|
96
|
-
* [knife-windows #133](https://github.com/
|
|
97
|
-
* [knife-windows #132](https://github.com/
|
|
98
|
-
* [knife-windows #129](https://github.com/
|
|
99
|
-
* [knife-windows #125](https://github.com/
|
|
100
|
-
* [knife-windows #92](https://github.com/
|
|
101
|
-
* [knife-windows #94](https://github.com/
|
|
117
|
+
* [knife-windows #139](https://github.com/chef/knife-windows/issues/139) Force dev dependency on Chef 11 for test scenarios to avoid Ohai 8 conflict on Ruby 1.9.x
|
|
118
|
+
* [knife-windows #126](https://github.com/chef/knife-windows/pull/126) Allow disabling of SSL peer verification in knife-windows for testing
|
|
119
|
+
* [knife-windows #154](https://github.com/chef/knife-windows/issues/154) Unreleased regression in master: NameError: undefined local variable or method `path_separator
|
|
120
|
+
* [knife-windows #143](https://github.com/chef/knife-windows/issues/143) Unreleased regression in master: WinRM::WinRMHTTPTransportError: Bad HTTP response returned from server (503) in the middle of bootstrap
|
|
121
|
+
* [knife-windows #133](https://github.com/chef/knife-windows/issues/133) Bootstrap failure -- unable to validate SSL chef server endpoints
|
|
122
|
+
* [knife-windows #132](https://github.com/chef/knife-windows/issues/132) New subcommands for WinRM: windows listener create, cert generate, and cert install
|
|
123
|
+
* [knife-windows #129](https://github.com/chef/knife-windows/issues/129) New --winrm-authentication-protocol option for explicit control of authentication
|
|
124
|
+
* [knife-windows #125](https://github.com/chef/knife-windows/issues/125) knife-windows should use PowerShell first before cscript to download the Chef Client msi
|
|
125
|
+
* [knife-windows #92](https://github.com/chef/knife-windows/issues/92) EventMachine issue: knife bootstrap windows winrm error
|
|
126
|
+
* [knife-windows #94](https://github.com/chef/knife-windows/issues/94) Remove Eventmachine dependency
|
|
102
127
|
* [knife-windows #252](https://github.com/chef/knife-windows/pull/252) Fail early on ECONNREFUSED, Closes #244.
|
|
103
128
|
* [knife-windows #260](https://github.com/chef/knife-windows/pull/260) Fail quickly on invalid option combinations, Closes #259
|
|
104
129
|
|
|
@@ -106,18 +131,18 @@
|
|
|
106
131
|
* [knife-windows #228](https://github.com/chef/knife-windows/pull/228) make winrm-s dep more strict on knife-windows 0.8.x
|
|
107
132
|
|
|
108
133
|
## Release: 0.8.4
|
|
109
|
-
* [knife-windows #133](https://github.com/
|
|
134
|
+
* [knife-windows #133](https://github.com/chef/knife-windows/issues/133) Bootstrap failure -- unable to validate SSL chef server endpoints
|
|
110
135
|
|
|
111
136
|
## Release: 0.8.3
|
|
112
|
-
* [knife-windows #131](https://github.com/
|
|
113
|
-
* [knife-windows #139](https://github.com/
|
|
137
|
+
* [knife-windows #131](https://github.com/chef/knife-windows/issues/108) Issue #131: Windows should be bootstrapped using latest Chef Client version compatible with knife's version just like non-Windows systems
|
|
138
|
+
* [knife-windows #139](https://github.com/chef/knife-windows/issues/139) Force dev dependency on Chef 11 for test scenarios to avoid Ohai 8 conflict on Ruby 1.9.x
|
|
114
139
|
|
|
115
140
|
## Release: 0.8.2
|
|
116
|
-
* [knife-windows #108](https://github.com/
|
|
141
|
+
* [knife-windows #108](https://github.com/chef/knife-windows/issues/108) Error: Unencrypted communication not supported if remote server does not require encryption
|
|
117
142
|
|
|
118
143
|
## Release: 0.8.0
|
|
119
|
-
* [knife-windows #98](https://github.com/
|
|
120
|
-
* [knife-windows #96](https://github.com/
|
|
144
|
+
* [knife-windows #98](https://github.com/chef/knife-windows/issues/98) Get winrm command exit code if it is not expected
|
|
145
|
+
* [knife-windows #96](https://github.com/chef/knife-windows/issues/96) Fix break from OS patch KB2918614
|
|
121
146
|
* Remove the 'instance data' method of creating EC2 servers
|
|
122
147
|
* Update winrm-s dependency along with em-winrm and winrm dependencies
|
|
123
148
|
* Return failure codes from knife winrm even when `returns` is not set
|
|
@@ -148,4 +173,4 @@ Release Notes - Knife Windows Plugin - Version 0.5.4
|
|
|
148
173
|
|
|
149
174
|
|
|
150
175
|
** New Feature
|
|
151
|
-
* [KNIFE\_WINDOWS-6] - default bootstrap template should support encrypted\_data\_bag\_secret
|
|
176
|
+
* [KNIFE\_WINDOWS-6] - default bootstrap template should support encrypted\_data\_bag\_secret
|
data/knife-windows.gemspec
CHANGED
|
@@ -19,7 +19,7 @@ Gem::Specification.new do |s|
|
|
|
19
19
|
|
|
20
20
|
s.add_development_dependency 'pry'
|
|
21
21
|
|
|
22
|
-
s.files = `git ls-files`.split("\
|
|
22
|
+
s.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(\..*|DOC_CHANGES.md|VERSION|appveyor.yml|RELEASE_NOTES.md)}) }
|
|
23
23
|
s.test_files = `git ls-files -- spec/*`.split("\n")
|
|
24
24
|
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
|
25
25
|
s.require_paths = ["lib"]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
@rem
|
|
2
2
|
@rem Author:: Seth Chisamore (<schisamo@chef.io>)
|
|
3
|
-
@rem Copyright:: Copyright (c) 2011-
|
|
3
|
+
@rem Copyright:: Copyright (c) 2011-2017 Chef Software, Inc.
|
|
4
4
|
@rem License:: Apache License, Version 2.0
|
|
5
5
|
@rem
|
|
6
6
|
@rem Licensed under the Apache License, Version 2.0 (the "License");
|
|
@@ -50,8 +50,8 @@
|
|
|
50
50
|
|
|
51
51
|
@echo Detected Windows Version %WinMajor%.%WinMinor% Build %WinBuild%
|
|
52
52
|
|
|
53
|
-
@set LATEST_OS_VERSION_MAJOR=
|
|
54
|
-
@set LATEST_OS_VERSION_MINOR=
|
|
53
|
+
@set LATEST_OS_VERSION_MAJOR=10
|
|
54
|
+
@set LATEST_OS_VERSION_MINOR=1
|
|
55
55
|
|
|
56
56
|
@if /i %WinMajor% GTR %LATEST_OS_VERSION_MAJOR% goto VersionUnknown
|
|
57
57
|
@if /i %WinMajor% EQU %LATEST_OS_VERSION_MAJOR% (
|
|
@@ -62,7 +62,7 @@ goto Version%WinMajor%.%WinMinor%
|
|
|
62
62
|
|
|
63
63
|
:VersionUnknown
|
|
64
64
|
@rem If this is an unknown version of windows set the default
|
|
65
|
-
@set MACHINE_OS=
|
|
65
|
+
@set MACHINE_OS=2012r2
|
|
66
66
|
@echo Warning: Unknown version of Windows, assuming default of Windows %MACHINE_OS%
|
|
67
67
|
goto architecture_select
|
|
68
68
|
|
|
@@ -84,7 +84,16 @@ goto architecture_select
|
|
|
84
84
|
|
|
85
85
|
@rem Currently Windows Server 2012 R2 is treated as equivalent to Windows Server 2012
|
|
86
86
|
:Version6.3
|
|
87
|
-
|
|
87
|
+
@set MACHINE_OS=2012r2
|
|
88
|
+
goto architecture_select
|
|
89
|
+
|
|
90
|
+
:Version10.0
|
|
91
|
+
@set MACHINE_OS=2016
|
|
92
|
+
goto architecture_select
|
|
93
|
+
|
|
94
|
+
@rem Currently Windows Server 2016 R2 is treated as equivalent to Windows Server 2016
|
|
95
|
+
:Version10.1
|
|
96
|
+
goto Version10.0
|
|
88
97
|
|
|
89
98
|
:architecture_select
|
|
90
99
|
<% if knife_config[:architecture] %>
|
|
@@ -241,6 +250,10 @@ mkdir <%= bootstrap_directory %>\ohai\hints
|
|
|
241
250
|
<%= first_boot %>
|
|
242
251
|
)
|
|
243
252
|
|
|
253
|
+
<% unless client_d.empty? -%>
|
|
254
|
+
mkdir <%= bootstrap_directory %>\client.d
|
|
255
|
+
<%= client_d %>
|
|
256
|
+
<% end -%>
|
|
257
|
+
|
|
244
258
|
@echo Starting chef to bootstrap the node...
|
|
245
259
|
<%= start_chef %>
|
|
246
|
-
|
|
@@ -350,6 +350,26 @@ WGET_PS
|
|
|
350
350
|
content
|
|
351
351
|
end
|
|
352
352
|
|
|
353
|
+
def client_d_content
|
|
354
|
+
content = ""
|
|
355
|
+
if @chef_config[:client_d_dir] && File.exist?(@chef_config[:client_d_dir])
|
|
356
|
+
root = Pathname(@chef_config[:client_d_dir])
|
|
357
|
+
root.find do |f|
|
|
358
|
+
relative = f.relative_path_from(root)
|
|
359
|
+
if f != root
|
|
360
|
+
file_on_node = "#{bootstrap_directory}/client.d/#{relative}".gsub("/","\\")
|
|
361
|
+
if f.directory?
|
|
362
|
+
content << "mkdir #{file_on_node}\n"
|
|
363
|
+
else
|
|
364
|
+
content << "> #{file_on_node} (\n" +
|
|
365
|
+
escape_and_echo(IO.read(File.expand_path(f))) + "\n)\n"
|
|
366
|
+
end
|
|
367
|
+
end
|
|
368
|
+
end
|
|
369
|
+
end
|
|
370
|
+
content
|
|
371
|
+
end
|
|
372
|
+
|
|
353
373
|
def fallback_install_task_command
|
|
354
374
|
# This command will be executed by schtasks.exe in the batch
|
|
355
375
|
# code below. To handle tasks that contain arguments that
|
|
@@ -58,7 +58,7 @@ class Chef
|
|
|
58
58
|
:proc => Proc.new { |shell| shell.to_sym }
|
|
59
59
|
|
|
60
60
|
option :winrm_transport,
|
|
61
|
-
:short => "-
|
|
61
|
+
:short => "-w TRANSPORT",
|
|
62
62
|
:long => "--winrm-transport TRANSPORT",
|
|
63
63
|
:description => "The WinRM transport type. Valid choices are [ssl, plaintext]",
|
|
64
64
|
:default => 'plaintext',
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
1 / 0
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
1 / 0
|
data/spec/spec_helper.rb
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
# Author:: Adam Edwards (<adamed@chef.io>)
|
|
3
|
-
# Copyright:: Copyright (c) 2012-
|
|
3
|
+
# Copyright:: Copyright (c) 2012-2017 Chef Software, Inc.
|
|
4
4
|
# License:: Apache License, Version 2.0
|
|
5
5
|
#
|
|
6
6
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
@@ -55,10 +55,39 @@ def windows2012?
|
|
|
55
55
|
is_win2k12
|
|
56
56
|
end
|
|
57
57
|
|
|
58
|
+
def windows2016?
|
|
59
|
+
is_win2k16 = false
|
|
60
|
+
|
|
61
|
+
if windows?
|
|
62
|
+
this_operating_system = WMI::Win32_OperatingSystem.find(:first)
|
|
63
|
+
os_version = this_operating_system.send('Version')
|
|
64
|
+
|
|
65
|
+
# The operating system version is a string in the following form
|
|
66
|
+
# that can be split into components based on the '.' delimiter:
|
|
67
|
+
# MajorVersionNumber.MinorVersionNumber.BuildNumber
|
|
68
|
+
os_version_components = os_version.split('.')
|
|
69
|
+
|
|
70
|
+
if os_version_components.length < 2
|
|
71
|
+
raise 'WMI returned a Windows version from Win32_OperatingSystem.Version ' +
|
|
72
|
+
'with an unexpected format. The Windows version could not be determined.'
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
# Windows 10.0 is Windows Server 2016, so test the major and
|
|
76
|
+
# minor version components
|
|
77
|
+
is_win2k16 = os_version_components[0] == '10' && os_version_components[1] == '0'
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
is_win2k16
|
|
81
|
+
end
|
|
82
|
+
|
|
58
83
|
def chef_lt_12_5?
|
|
59
84
|
Gem::Version.new(Chef::VERSION) < Gem::Version.new('12.5')
|
|
60
85
|
end
|
|
61
86
|
|
|
87
|
+
def chef_gte_12?
|
|
88
|
+
Chef::VERSION.split('.').first.to_i >= 12
|
|
89
|
+
end
|
|
90
|
+
|
|
62
91
|
def chef_gte_12_5?
|
|
63
92
|
Gem::Version.new(Chef::VERSION) >= Gem::Version.new('12.5')
|
|
64
93
|
end
|
|
@@ -101,6 +101,9 @@ expected: #{expected}
|
|
|
101
101
|
:ssh_gateway_identity,
|
|
102
102
|
:bootstrap_proxy_user,
|
|
103
103
|
:bootstrap_proxy_pass,
|
|
104
|
+
:bootstrap_preinstall_command,
|
|
105
|
+
:distro, # Deprecated - remove this when the flag is removed.
|
|
106
|
+
:template_file, # Deprecated - remove this when the flag is removed.
|
|
104
107
|
]}
|
|
105
108
|
|
|
106
109
|
# win_ignore: Options in windows that aren't relevant to core.
|
|
@@ -120,6 +123,8 @@ expected: #{expected}
|
|
|
120
123
|
:winrm_codepage,
|
|
121
124
|
:concurrency,
|
|
122
125
|
:winrm_shell,
|
|
126
|
+
:distro, # Deprecated - remove this when the flag is removed.
|
|
127
|
+
:template_file, # Deprecated - remove this when the flag is removed.
|
|
123
128
|
] }
|
|
124
129
|
|
|
125
130
|
include_examples 'compare_options'
|
|
@@ -148,12 +153,17 @@ expected: #{expected}
|
|
|
148
153
|
:ssh_gateway_identity,
|
|
149
154
|
:bootstrap_proxy_user,
|
|
150
155
|
:bootstrap_proxy_pass,
|
|
156
|
+
:bootstrap_preinstall_command,
|
|
157
|
+
:distro, # Deprecated - remove this when the flag is removed.
|
|
158
|
+
:template_file, # Deprecated - remove this when the flag is removed.
|
|
151
159
|
]}
|
|
152
160
|
# win_ignore: Options in windows that aren't relevant to core.
|
|
153
161
|
let(:win_ignore) { [
|
|
154
162
|
:auth_timeout,
|
|
155
163
|
:install_as_service,
|
|
156
164
|
:host_key_verification, # Deprecated - remove this when the flag is removed.
|
|
165
|
+
:distro, # Deprecated - remove this when the flag is removed.
|
|
166
|
+
:template_file, # Deprecated - remove this when the flag is removed.
|
|
157
167
|
] }
|
|
158
168
|
|
|
159
169
|
include_examples 'compare_options'
|
|
@@ -95,4 +95,45 @@ describe Chef::Knife::BootstrapWindowsWinrm do
|
|
|
95
95
|
end
|
|
96
96
|
end
|
|
97
97
|
|
|
98
|
+
describe "when setting client_d_dir" do
|
|
99
|
+
before do
|
|
100
|
+
Chef::Config[:client_d_dir] = client_d_dir
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
context "client_d_dir is nil" do
|
|
104
|
+
let(:client_d_dir) { nil }
|
|
105
|
+
|
|
106
|
+
it "does not create c:/chef/client.d" do
|
|
107
|
+
expect(rendered_template).not_to match(%r{mkdir c:\chef\client.d})
|
|
108
|
+
end
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
context "client_d_dir is set" do
|
|
112
|
+
let(:client_d_dir) do
|
|
113
|
+
Chef::Util::PathHelper.cleanpath(
|
|
114
|
+
File.join(File.dirname(__FILE__), "../../data/client.d_00")) end
|
|
115
|
+
|
|
116
|
+
it "creates c:/chef/client.d" do
|
|
117
|
+
expect(rendered_template).to match(/mkdir C:\\chef\\client.d/)
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
context "a flat directory structure" do
|
|
121
|
+
|
|
122
|
+
it "creates a foo directory" do
|
|
123
|
+
expect(rendered_template).to match(/C:\\chef\\client.d\\foo/)
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
it "creates a file 00-foo.rb" do
|
|
127
|
+
expect(rendered_template).to match(/C:\\chef\\client.d\\00-foo.rb/)
|
|
128
|
+
expect(rendered_template).to match("d6f9b976-289c-4149-baf7-81e6ffecf228")
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
it "creates a file bar" do
|
|
132
|
+
expect(rendered_template).to match(/C:\\chef\\client.d\\foo\\bar.rb/)
|
|
133
|
+
expect(rendered_template).to match("1 / 0")
|
|
134
|
+
end
|
|
135
|
+
end
|
|
136
|
+
end
|
|
137
|
+
end
|
|
138
|
+
|
|
98
139
|
end
|
|
@@ -84,7 +84,7 @@ describe Chef::Knife::Winrm do
|
|
|
84
84
|
'-m', 'localhost',
|
|
85
85
|
'-x', winrm_user,
|
|
86
86
|
'-P', password,
|
|
87
|
-
'-
|
|
87
|
+
'-w', transport,
|
|
88
88
|
'--winrm-authentication-protocol', protocol,
|
|
89
89
|
'echo helloworld'
|
|
90
90
|
]
|
|
@@ -155,7 +155,7 @@ describe Chef::Knife::Winrm do
|
|
|
155
155
|
[
|
|
156
156
|
'-m', 'localhost',
|
|
157
157
|
'-x', winrm_user,
|
|
158
|
-
'-
|
|
158
|
+
'-w', transport,
|
|
159
159
|
'--winrm-authentication-protocol', protocol,
|
|
160
160
|
'echo helloworld'
|
|
161
161
|
]
|
|
@@ -230,7 +230,7 @@ describe Chef::Knife::Winrm do
|
|
|
230
230
|
allow(Chef::Platform).to receive(:windows?).and_return(false)
|
|
231
231
|
end
|
|
232
232
|
|
|
233
|
-
let(:winrm_command_http) { Chef::Knife::Winrm.new(['-m', 'localhost', '-x', 'testuser', '-P', 'testpassword', '-
|
|
233
|
+
let(:winrm_command_http) { Chef::Knife::Winrm.new(['-m', 'localhost', '-x', 'testuser', '-P', 'testpassword', '-w', 'plaintext', '--winrm-authentication-protocol', 'basic', 'echo helloworld']) }
|
|
234
234
|
|
|
235
235
|
it "defaults to the http uri scheme" do
|
|
236
236
|
expect(Chef::Knife::WinrmSession).to receive(:new).with(hash_including(:transport => :plaintext)).and_call_original
|
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.9.
|
|
4
|
+
version: 1.9.6
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Seth Chisamore
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2018-
|
|
11
|
+
date: 2018-10-23 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: winrm
|
|
@@ -60,17 +60,11 @@ executables: []
|
|
|
60
60
|
extensions: []
|
|
61
61
|
extra_rdoc_files: []
|
|
62
62
|
files:
|
|
63
|
-
- ".gitignore"
|
|
64
|
-
- ".rspec"
|
|
65
|
-
- ".travis.yml"
|
|
66
63
|
- CHANGELOG.md
|
|
67
|
-
- DOC_CHANGES.md
|
|
68
64
|
- Gemfile
|
|
69
65
|
- LICENSE
|
|
70
66
|
- README.md
|
|
71
|
-
- RELEASE_NOTES.md
|
|
72
67
|
- Rakefile
|
|
73
|
-
- appveyor.yml
|
|
74
68
|
- ci.gemfile
|
|
75
69
|
- knife-windows.gemspec
|
|
76
70
|
- lib/chef/knife/bootstrap/windows-chef-client-msi.erb
|
|
@@ -102,6 +96,9 @@ files:
|
|
|
102
96
|
- spec/assets/win_template_rendered_without_bootstrap_install_command_on_12_5_client.txt
|
|
103
97
|
- spec/assets/win_template_rendered_without_bootstrap_install_command_on_13_client.txt
|
|
104
98
|
- spec/assets/win_template_unrendered.txt
|
|
99
|
+
- spec/data/client.d_00/00-foo.rb
|
|
100
|
+
- spec/data/client.d_00/foo/bar.rb
|
|
101
|
+
- spec/data/client.d_01/foo/bar.rb
|
|
105
102
|
- spec/dummy_winrm_connection.rb
|
|
106
103
|
- spec/functional/bootstrap_download_spec.rb
|
|
107
104
|
- spec/spec_helper.rb
|
|
@@ -135,7 +132,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
135
132
|
version: '0'
|
|
136
133
|
requirements: []
|
|
137
134
|
rubyforge_project:
|
|
138
|
-
rubygems_version: 2.7.
|
|
135
|
+
rubygems_version: 2.7.6
|
|
139
136
|
signing_key:
|
|
140
137
|
specification_version: 4
|
|
141
138
|
summary: Plugin that adds functionality to Chef's Knife CLI for configuring/interacting
|
|
@@ -151,6 +148,9 @@ test_files:
|
|
|
151
148
|
- spec/assets/win_template_rendered_without_bootstrap_install_command_on_12_5_client.txt
|
|
152
149
|
- spec/assets/win_template_rendered_without_bootstrap_install_command_on_13_client.txt
|
|
153
150
|
- spec/assets/win_template_unrendered.txt
|
|
151
|
+
- spec/data/client.d_00/00-foo.rb
|
|
152
|
+
- spec/data/client.d_00/foo/bar.rb
|
|
153
|
+
- spec/data/client.d_01/foo/bar.rb
|
|
154
154
|
- spec/dummy_winrm_connection.rb
|
|
155
155
|
- spec/functional/bootstrap_download_spec.rb
|
|
156
156
|
- spec/spec_helper.rb
|
data/.gitignore
DELETED
data/.rspec
DELETED
data/.travis.yml
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
language: ruby
|
|
2
|
-
cache: bundler
|
|
3
|
-
dist: trusty
|
|
4
|
-
sudo: false
|
|
5
|
-
|
|
6
|
-
rvm:
|
|
7
|
-
- 2.3.4
|
|
8
|
-
- 2.4.1
|
|
9
|
-
- ruby-head
|
|
10
|
-
|
|
11
|
-
before_install:
|
|
12
|
-
- gem install bundler
|
|
13
|
-
|
|
14
|
-
gemfile: ci.gemfile
|
|
15
|
-
|
|
16
|
-
env:
|
|
17
|
-
- CHEF_VERSION="master"
|
|
18
|
-
- CHEF_VERSION="~> 13.0"
|
|
19
|
-
|
|
20
|
-
matrix:
|
|
21
|
-
exclude:
|
|
22
|
-
- rvm: 2.3.4
|
|
23
|
-
env: CHEF_VERSION="master"
|
|
24
|
-
allow_failures:
|
|
25
|
-
- rvm: ruby-head
|
|
26
|
-
|
|
27
|
-
branches:
|
|
28
|
-
only:
|
|
29
|
-
- master
|
data/DOC_CHANGES.md
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
<!---
|
|
2
|
-
This file is reset every time a new release is done. This file describes changes that have not yet been released.
|
|
3
|
-
|
|
4
|
-
Example Doc Change:
|
|
5
|
-
### Headline for the required change
|
|
6
|
-
Description of the required change.
|
|
7
|
-
-->
|
|
8
|
-
# knife-windows 1.6.0 doc changes
|
|
9
|
-
|
|
10
|
-
### Choosing a winrm shell
|
|
11
|
-
|
|
12
|
-
<!---
|
|
13
|
-
This file is reset every time a new release is done. The contents of this file are for the currently unreleased version.
|
|
14
|
-
|
|
15
|
-
Example Note:
|
|
16
|
-
|
|
17
|
-
## Example Heading
|
|
18
|
-
Details about the thing that changed that needs to get included in the Release Notes in markdown.
|
|
19
|
-
-->
|
|
20
|
-
# knife-windows 1.6.0 release notes:
|
|
21
|
-
|
|
22
|
-
This release adds a `--winrm-shell` argument to `knife winrm`. This accepts one of three possible values: `cmd`, `powershell` or `elevated`. The default value is `cmd`. The `elevated` shell is similar to the `powershell` shell but runs the powershell command from a scheduled task.
|
data/RELEASE_NOTES.md
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
<!---
|
|
2
|
-
This file is reset every time a new release is done. The contents of this file are for the currently unreleased version.
|
|
3
|
-
|
|
4
|
-
Example Note:
|
|
5
|
-
|
|
6
|
-
## Example Heading
|
|
7
|
-
Details about the thing that changed that needs to get included in the Release Notes in markdown.
|
|
8
|
-
-->
|
|
9
|
-
# knife-windows 1.9.0 release notes:
|
|
10
|
-
|
|
11
|
-
This release re-introduces support for concurrent WinRM connections when
|
|
12
|
-
running `knife winrm`. Simply specify the number of concurrent connections
|
|
13
|
-
you would like using the `-C` (or `--concurrency`) flag.
|
|
14
|
-
|
|
15
|
-
```
|
|
16
|
-
knife winrm "role:web" "net stats srv" -X Administrator -P 'super_secret_password' -C 4
|
|
17
|
-
```
|
data/appveyor.yml
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
version: "master-{build}"
|
|
2
|
-
|
|
3
|
-
os: Windows Server 2012
|
|
4
|
-
platform:
|
|
5
|
-
- x64
|
|
6
|
-
|
|
7
|
-
environment:
|
|
8
|
-
bundle_gemfile: ci.gemfile
|
|
9
|
-
|
|
10
|
-
matrix:
|
|
11
|
-
- ruby_version: "24"
|
|
12
|
-
chef_version: "~> 13.0"
|
|
13
|
-
|
|
14
|
-
- ruby_version: "24"
|
|
15
|
-
chef_version: "master"
|
|
16
|
-
|
|
17
|
-
clone_folder: c:\projects\knife-windows
|
|
18
|
-
clone_depth: 1
|
|
19
|
-
branches:
|
|
20
|
-
only:
|
|
21
|
-
- master
|
|
22
|
-
|
|
23
|
-
install:
|
|
24
|
-
- winrm quickconfig -q
|
|
25
|
-
- SET PATH=C:\Ruby%ruby_version%\bin;%PATH%
|
|
26
|
-
- echo %PATH%
|
|
27
|
-
- ruby --version
|
|
28
|
-
- gem --version
|
|
29
|
-
- gem install bundler -v 1.11.2 --quiet --no-ri --no-rdoc
|
|
30
|
-
- bundler --version
|
|
31
|
-
|
|
32
|
-
build_script:
|
|
33
|
-
- bundle install || bundle install || bundle install
|
|
34
|
-
|
|
35
|
-
test_script:
|
|
36
|
-
- bundle exec rake
|