Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Workaround for #109 #123

Merged
merged 8 commits into from
Jan 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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