Skip to content

Commit

Permalink
Workaround for #109 (#123)
Browse files Browse the repository at this point in the history
Co-authored-by: willtome <wtome@redhat.com>
  • Loading branch information
MKletz and willtome authored Jan 8, 2024
1 parent d60e0c7 commit 1af584b
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions windows/powershell_dsc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,18 @@
gather_facts: false

tasks:
- name: Setup PsGallery
ansible.windows.win_powershell:
script: |
$nuget_version = (Get-PackageProvider -Name NuGet -ListAvailable).version
$nuget_target_version = [Version]::new('2.8.5.201')
if( $nuget_version -lt $nuget_target_version ){
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
Install-PackageProvider -Name NuGet -MinimumVersion $nuget_target_version -Force
Install-Module -Name packagemanagement -Force
Install-Module -Name powershellget -Force
}
- name: Setup the SecurityPolicyDSC module
community.windows.win_psmodule:
name: SecurityPolicyDSC
Expand Down

0 comments on commit 1af584b

Please sign in to comment.