-
-
Notifications
You must be signed in to change notification settings - Fork 102
/
main.yml
112 lines (98 loc) · 5.14 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
---
#####################################################
# OpenSSL is required (and redistributed) by OpenJ9 #
#####################################################
# The version number and associated sha256sum (For the file at
# https://www.openssl.org/source/openssl-{{ opensslVersion }}.tar.gz
# should be all you need when upgrading the version of openssl. See
# the checksum: line later on to set the checksum
- name: Set desired OpenSSL version
set_fact: opensslVersion=1.1.1i
tags: openssl
#- name: Set OpenSSL SHA256 checksum (This didn't work in the role it's used for some reason - sxa)
# set_fact: opensslChecksum=e8be6a35fe41d10603c3cc635e93289ed00bf34b79671a3a4de64fcee00d5242
# tags: openssl
- name: Check if OpenSSL 32bit VS2013 installed
win_stat:
path: C:\openjdk\OpenSSL-{{ opensslVersion }}-x86_32-VS2013
register: openssl32_installed
tags: openssl
- name: Check if OpenSSL 64bit VS2013 installed
win_stat:
path: C:\openjdk\OpenSSL-{{ opensslVersion }}-x86_64-VS2013
register: openssl64_vs2013_installed
tags: openssl
- name: Check if OpenSSL 64bit VS2017 installed
win_stat:
path: C:\openjdk\OpenSSL-{{ opensslVersion }}-x86_64-VS2017
register: openssl64_vs2017_installed
tags: openssl
- name: Check if OpenSSL 64bit VS2019 installed
win_stat:
path: C:\openjdk\OpenSSL-{{ opensslVersion }}-x86_64-VS2019
register: openssl64_vs2019_installed
tags: openssl
- name: Download OpenSSL-{{ opensslVersion }}
win_get_url:
url: https://www.openssl.org/source/openssl-{{ opensslVersion }}.tar.gz
dest: C:\temp\OpenSSL-{{ opensslVersion }}.tar.gz
checksum: e8be6a35fe41d10603c3cc635e93289ed00bf34b79671a3a4de64fcee00d5242
checksum_algorithm: sha256
when: (not openssl32_installed.stat.exists) or (not openssl64_vs2013_installed.stat.exists) or (not openssl64_vs2017_installed.stat.exists) or (not openssl64_vs2019_installed.stat.exists)
tags: openssl
# Note: -aos tells it to ignore any existing pax-global_header file that is extracted
# Can probably be removed after the version with del pax_global_header is run everywhere
- name: Unpack OpenSSL-{{ opensslVersion }} for installation
win_shell: |
cd C:\temp
C:\7-Zip\7z.exe x C:\temp\OpenSSL-{{ opensslVersion }}.tar.gz
C:\7-Zip\7z.exe x -aos C:\temp\OpenSSL-{{ opensslVersion }}.tar
del pax_global_header
when: (not openssl32_installed.stat.exists) or (not openssl64_vs2013_installed.stat.exists) or (not openssl64_vs2017_installed.stat.exists) or (not openssl64_vs2019_installed.stat.exists)
tags: openssl
- name: Install OpenSSL-{{ opensslVersion }} 32-bit (VS2013)
win_shell: set PATH=C:\Strawberry\perl\bin;C:\openjdk\nasm-2.13.03;%PATH% && .\vsvars32.bat && cd C:\temp\OpenSSL-{{ opensslVersion }} && perl C:\temp\OpenSSL-{{ opensslVersion }}\Configure VC-WIN32 --prefix=C:\openjdk\OpenSSL-{{ opensslVersion }}-x86_32-VS2013 && nmake install > C:\temp\openssl32.log && nmake -f makefile clean
args:
chdir: 'C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools'
executable: cmd
when: (not openssl32_installed.stat.exists)
tags:
- openssl
- MSVS_2013
- name: Install OpenSSL-{{ opensslVersion }} 64-bit (VS2013)
win_shell: set PATH=C:\Strawberry\perl\bin;C:\openjdk\nasm-2.13.03;%PATH% && .\vcvarsall.bat AMD64 && cd C:\temp\OpenSSL-{{ opensslVersion }} && perl C:\temp\OpenSSL-{{ opensslVersion }}\Configure VC-WIN64A --prefix=C:\openjdk\OpenSSL-{{ opensslVersion }}-x86_64-VS2013 && nmake install > C:\temp\openssl64-VS2013.log && nmake -f makefile clean
args:
chdir: 'C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC'
executable: cmd
when: (not openssl64_vs2013_installed.stat.exists)
tags:
- openssl
- MSVS_2013
- name: Install OpenSSL-{{ opensslVersion }} 64-bit (VS2017)
win_shell: set PATH=C:\Strawberry\perl\bin;C:\openjdk\nasm-2.13.03;%PATH% && .\vcvarsall.bat AMD64 && cd C:\temp\OpenSSL-{{ opensslVersion }} && perl C:\temp\OpenSSL-{{ opensslVersion }}\Configure VC-WIN64A --prefix=C:\openjdk\OpenSSL-{{ opensslVersion }}-x86_64-VS2017 && nmake install > C:\temp\openssl64-VS2017.log && nmake -f makefile clean
args:
chdir: 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build'
executable: cmd
when: (not openssl64_vs2017_installed.stat.exists)
tags:
- openssl
- MSVS_2017
- name: Install OpenSSL-{{ opensslVersion }} 64-bit (VS2019)
win_shell: set PATH=C:\Strawberry\perl\bin;C:\openjdk\nasm-2.13.03;%PATH% && .\vcvarsall.bat AMD64 && cd C:\temp\OpenSSL-{{ opensslVersion }} && perl C:\temp\OpenSSL-{{ opensslVersion }}\Configure VC-WIN64A --prefix=C:\openjdk\OpenSSL-{{ opensslVersion }}-x86_64-VS2019 && nmake install > C:\temp\openssl64-VS2019.log && nmake -f makefile clean
args:
chdir: 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build'
executable: cmd
when: (not openssl64_vs2019_installed.stat.exists)
tags:
- openssl
- MSVS_2019
- name: Cleanup OpenSSL source files
win_file:
path: C:\temp\{{ item }}
state: absent
with_items:
- OpenSSL-{{ opensslVersion }}.tar.gz
- OpenSSL-{{ opensslVersion }}.tar
- OpenSSL-{{ opensslVersion }}
- pax_global_header
tags: openssl