knife-windows 4.0.6 → 4.0.7
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6f7b54f5b7e7859cd0964f315d6665981b2e7fb78776683b52b81a73bacc51e4
|
4
|
+
data.tar.gz: e69fe477779128138dca7e45c6839e096f45ebee16861860538d10056ead1c1d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 235a3c423f774569de51509ed0f8d717c01afbc66a58a4825091b16ab35987870757860baa35e3ec8767879fb42adea4964a2c11f45ccc6a5509ea116a30dccb
|
7
|
+
data.tar.gz: ef2598ce31d29f0bfc5ed933005f1d2b3fbb669d964d3eac5306435c3b3ca59ba9cda9d25e75e256846bc2a91b142a0fa1ff6dce7ce8864584fa3f7f42b28d02
|
@@ -1,5 +1,5 @@
|
|
1
1
|
# Author:: Mukta Aphale (<mukta.aphale@clogeny.com>)
|
2
|
-
# Copyright:: Copyright (c)
|
2
|
+
# Copyright:: Copyright (c) Chef Software Inc.
|
3
3
|
# License:: Apache License, Version 2.0
|
4
4
|
#
|
5
5
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
@@ -60,6 +60,10 @@ class Chef
|
|
60
60
|
passphrase.strip
|
61
61
|
end
|
62
62
|
|
63
|
+
def exitstatus
|
64
|
+
$?.exitstatus
|
65
|
+
end
|
66
|
+
|
63
67
|
def run
|
64
68
|
STDOUT.sync = STDERR.sync = true
|
65
69
|
|
@@ -68,7 +72,7 @@ class Chef
|
|
68
72
|
if config[:cert_install]
|
69
73
|
config[:cert_passphrase] = get_cert_passphrase unless config[:cert_passphrase]
|
70
74
|
result = `powershell.exe -Command " '#{config[:cert_passphrase]}' | certutil -importPFX '#{config[:cert_install]}' AT_KEYEXCHANGE"`
|
71
|
-
if
|
75
|
+
if exitstatus
|
72
76
|
ui.info "Certificate installed to Certificate Store"
|
73
77
|
result = `powershell.exe -Command " echo (Get-PfxCertificate #{config[:cert_install]}).thumbprint "`
|
74
78
|
ui.info "Certificate Thumbprint: #{result}"
|
@@ -88,7 +92,7 @@ class Chef
|
|
88
92
|
result = `winrm create winrm/config/Listener?Address=*+Transport=HTTPS @{Hostname="#{config[:hostname]}";CertificateThumbprint="#{config[:cert_thumbprint]}";Port="#{config[:port]}"}`
|
89
93
|
Chef::Log.debug result
|
90
94
|
|
91
|
-
if
|
95
|
+
if exitstatus == 0
|
92
96
|
ui.info "WinRM listener created with Port: #{config[:port]} and CertificateThumbprint: #{config[:cert_thumbprint]}"
|
93
97
|
else
|
94
98
|
ui.error "Error creating WinRM listener. use -VV for more details."
|
@@ -1,6 +1,6 @@
|
|
1
1
|
#
|
2
2
|
# Author:: Mukta Aphale <mukta.aphale@clogeny.com>
|
3
|
-
# Copyright:: Copyright (c)
|
3
|
+
# Copyright:: Copyright (c) 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");
|
@@ -41,7 +41,7 @@ describe Chef::Knife::WindowsListenerCreate do
|
|
41
41
|
@listener.config[:port] = "5986"
|
42
42
|
@listener.config[:basic_auth] = true
|
43
43
|
expect(@listener).to receive(:`).with("winrm create winrm/config/Listener?Address=*+Transport=HTTPS @{Hostname=\"host\";CertificateThumbprint=\"CERT-THUMBPRINT\";Port=\"5986\"}")
|
44
|
-
expect(
|
44
|
+
expect(@listener).to receive(:exitstatus).and_return(100)
|
45
45
|
expect(@listener.ui).to receive(:error).with("Error creating WinRM listener. use -VV for more details.")
|
46
46
|
expect(@listener.ui).to_not receive(:info).with("WinRM listener created with Port: 5986 and CertificateThumbprint: CERT-THUMBPRINT")
|
47
47
|
expect { @listener.run }.to raise_error(SystemExit)
|
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: 4.0.
|
4
|
+
version: 4.0.7
|
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: 2021-03-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: chef
|
@@ -123,7 +123,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
123
123
|
- !ruby/object:Gem::Version
|
124
124
|
version: '0'
|
125
125
|
requirements: []
|
126
|
-
rubygems_version: 3.
|
126
|
+
rubygems_version: 3.1.4
|
127
127
|
signing_key:
|
128
128
|
specification_version: 4
|
129
129
|
summary: Plugin that adds functionality to Chef's Knife CLI for configuring/interacting
|