Skip to content

Commit 0ef7842

Browse files
authored
Merge pull request #9 from EncoreTechnologies/release/v2.1.0
Release v2.1.0
2 parents ae09203 + 3e452ee commit 0ef7842

File tree

4 files changed

+26
-63
lines changed

4 files changed

+26
-63
lines changed

CHANGELOG.md

+7
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
## Development
22

3+
## 2.1.0 (2020-04-28)
4+
35
* `psrepository` - Fixed the inability to register psrepoositorys when none are registered on the node prior to puppet due to bug in `instances_command` expecting a returned hashtable. (Bugfix)
46

57
* `psrepository` - Many fixes around the default powershell gallery repo due to the `flush` command attempting to set the source_location of the repo. (Bugfix)
@@ -11,8 +13,13 @@
1113
* `package` - Fixed the inability to upgrade previously installed modules with -AllowClobber. This would previously fail with an error if a cmdlet was moved to a new module. Powershell would error stating the cmdlet exists in the system already within a module and you need to specific -AllowClobber to install the new one. (Bugfix)
1214

1315
* Converted the module over to PDK for validation and spec testing. (Feature)
16+
1417
* Enabled Travis builds (Feature)
1518

19+
* Enabled TLSv1.2 which is required to communicate with PowerShell Gallery. Previously,
20+
this module did not enforce TLSv1.2 and the repository setup commands would fail. (Bugfix)
21+
22+
Contributed by @pauby
1623

1724
## 2.0.1 (September 6, 2018)
1825

lib/puppet/provider/package/windowspowershell.rb

+6-3
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,13 @@
66
commands powershell: 'powershell'
77

88
def self.invoke_ps_command(command)
9+
# The SecurityProtocol section of the -Command forces PowerShell to use TLSv1.2,
10+
# which is not enabled by default unless explicitly configured system-wide in the registry.
11+
# The PowerShell Gallery website enforces the use of TLSv1.2 for all incoming connections,
12+
# so without forcing TLSv1.2 here the command will fail.
13+
sec_proto_cmd = '[Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol -bor [Net.SecurityProtocolType]::Tls12'
914
result = powershell(['-NoProfile', '-ExecutionPolicy', 'Bypass', '-NonInteractive', '-NoLogo', '-Command',
10-
# The following section of the -Command forces powershell to use tls1.2 (which it does not by default currently unless set system wide): [Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol -bor [Net.SecurityProtocolType]::Tls12
11-
# Without tls1.2 you cannot install modules from PSGallery
12-
"$ProgressPreference = 'SilentlyContinue'; $ErrorActionPreference = 'Stop'; [Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol -bor [Net.SecurityProtocolType]::Tls12; #{command}"])
15+
"$ProgressPreference = 'SilentlyContinue'; $ErrorActionPreference = 'Stop'; #{sec_proto_cmd}; #{command}"])
1316
result.lines
1417
end
1518
end

lib/puppet/provider/pspackageprovider/windowspowershell.rb

+6-3
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,13 @@
33
commands powershell: 'powershell'
44

55
def self.invoke_ps_command(command)
6+
# The SecurityProtocol section of the -Command forces PowerShell to use TLSv1.2,
7+
# which is not enabled by default unless explicitly configured system-wide in the registry.
8+
# The PowerShell Gallery website enforces the use of TLSv1.2 for all incoming connections,
9+
# so without forcing TLSv1.2 here the command will fail.
10+
sec_proto_cmd = '[Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol -bor [Net.SecurityProtocolType]::Tls12'
611
result = powershell(['-NoProfile', '-ExecutionPolicy', 'Bypass', '-NonInteractive', '-NoLogo', '-Command',
7-
# The following section of the -Command forces powershell to use tls1.2 (which it does not by default currently unless set system wide): [Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol -bor [Net.SecurityProtocolType]::Tls12
8-
# Without tls1.2 you cannot install modules from PSGallery
9-
"$ProgressPreference = 'SilentlyContinue'; $ErrorActionPreference = 'Stop'; [Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol -bor [Net.SecurityProtocolType]::Tls12; #{command}"])
12+
"$ProgressPreference = 'SilentlyContinue'; $ErrorActionPreference = 'Stop'; #{sec_proto_cmd}; #{command}"])
1013
result.lines
1114
end
1215
end

metadata.json

+7-57
Original file line numberDiff line numberDiff line change
@@ -1,73 +1,23 @@
11
{
2-
"name": "hbuckle-powershellmodule",
3-
"version": "2.0.1",
4-
"author": "Henry Buckle",
2+
"name": "encore-powershellmodule",
3+
"version": "2.1.0",
4+
"author": "Encore Technologies",
55
"summary": "Manage PowerShell modules and repositories",
66
"license": "Apache-2.0",
7-
"source": "https://github.com/hbuckle/puppet-powershellmodule",
8-
"project_page": "https://github.com/hbuckle/puppet-powershellmodule",
9-
"issues_url": "https://github.com/hbuckle/puppet-powershellmodule/issues",
7+
"source": "https://github.com/EncoreTechnologies/puppet-powershellmodule",
8+
"project_page": "https://github.com/EncoreTechnologies/puppet-powershellmodule",
9+
"issues_url": "https://github.com/EncoreTechnologies/puppet-powershellmodule/issues",
1010
"dependencies": [
1111

1212
],
1313
"operatingsystem_support": [
1414
{
1515
"operatingsystem": "Windows",
1616
"operatingsystemrelease": [
17-
"Server 2008",
18-
"Server 2008 R2",
1917
"Server 2012",
2018
"Server 2012 R2",
2119
"Server 2016",
22-
"7",
23-
"8.1",
24-
"10"
25-
]
26-
},
27-
{
28-
"operatingsystem": "Debian",
29-
"operatingsystemrelease": [
30-
"8.7+",
31-
"9"
32-
]
33-
},
34-
{
35-
"operatingsystem": "CentOS",
36-
"operatingsystemrelease": [
37-
"7"
38-
]
39-
},
40-
{
41-
"operatingsystem": "Ubuntu",
42-
"operatingsystemrelease": [
43-
"14.04",
44-
"16.04",
45-
"17.04"
46-
]
47-
},
48-
{
49-
"operatingsystem": "RedHat",
50-
"operatingsystemrelease": [
51-
"7"
52-
]
53-
},
54-
{
55-
"operatingsystem": "Fedora",
56-
"operatingsystemrelease": [
57-
"25",
58-
"26"
59-
]
60-
},
61-
{
62-
"operatingsystem": "openSUSE",
63-
"operatingsystemrelease": [
64-
"42.2"
65-
]
66-
},
67-
{
68-
"operatingsystem": "OSX",
69-
"operatingsystemrelease": [
70-
"10.12+"
20+
"Server 2019"
7121
]
7222
}
7323
],

0 commit comments

Comments
 (0)