-
-
Notifications
You must be signed in to change notification settings - Fork 101
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WinPB: Add Installation of VS2022 Redists
- Loading branch information
1 parent
6edae3d
commit 2c21ca4
Showing
2 changed files
with
49 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 47 additions & 0 deletions
47
ansible/playbooks/AdoptOpenJDK_Windows_Playbook/roles/MSVS_2022_REDIST/tasks/main.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
--- | ||
########################################### | ||
# Visual Studio 2022 Redists Installation # | ||
########################################### | ||
|
||
- name: Test if VS 2022 Redists Are installed | ||
win_stat: | ||
path: 'c:\openjdk\devkit\vs2022_redist_14.40.33807_10.0.26100.0' | ||
register: vs2022sdk_installed | ||
tags: MSVS_2022_REDIST | ||
|
||
- name: Check if the directory exists | ||
ansible.windows.win_stat: | ||
path: 'c:\openjdk\devkit' | ||
register: directory_status | ||
tags: MSVS_2022_REDIST | ||
|
||
- name: Create the directory if it does not exist | ||
ansible.windows.win_file: | ||
path: 'c:\openjdk\devkit\' | ||
state: directory | ||
when: not directory_status.stat.exists | ||
tags: MSVS_2022_REDIST | ||
|
||
# Download & Install VS2022 Redists From Github | ||
|
||
- name: Download Visual Studio 2022 Redists | ||
win_get_url: | ||
url: 'https://github.com/adoptium/devkit-binaries/releases/download/vs2022_redist_14.40.33807_10.0.26100.0/vs2022_redist_14.40.33807_10.0.26100.0.zip' | ||
checksum: a29ada15d941a7b2065e9a4273fd6b97df44d089ed2b9f860ded442f7fe69767 | ||
checksum_algorithm: sha256 | ||
dest: 'c:\openjdk\devkit\vs2022_redist_14.40.33807_10.0.26100.0.zip' | ||
force: no | ||
tags: MSVS_2022_REDIST | ||
|
||
- name: Unzip Visual Studio 2022 Redists | ||
win_unzip: | ||
src: 'c:\openjdk\devkit\vs2022_redist_14.40.33807_10.0.26100.0.zip' | ||
dest: 'c:\openjdk\devkit\vs2022_redist_14.40.33807_10.0.26100.0' | ||
when: not vs2022sdk_installed.stat.exists | ||
tags: MSVS_2022_REDIST | ||
|
||
- name: Remove VS2022 SDK Download | ||
win_file: | ||
path: 'c:\openjdk\devkit\vs2022_redist_14.40.33807_10.0.26100.0.zip' | ||
state: absent | ||
tags: MSVS_2022_REDIST |