Workaround for #109 (#123)

Co-authored-by: willtome <wtome@redhat.com>
This commit is contained in:
MKletz
2024-01-08 09:08:52 -06:00
committed by GitHub
parent d60e0c7ca6
commit 1af584b4ea

View File

@@ -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