Skip to content

Commit

Permalink
aixPb: Install OpenSSL3 on Aix (#3278)
Browse files Browse the repository at this point in the history
* update openssl role to install openssl3

* add comments

* change name of role to openssl3

* simplify awk command

* specifiy which awk

* change command to shell

* change src directory

* add /usr/bin to PATH before installing

* change command to shell again

* add some debug to check condition and comment for where they can download openssl3

* adjust condition and debug

* remove debug

* linter
  • Loading branch information
Haroon-Khel authored Dec 14, 2023
1 parent 65237cf commit a12cf0f
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 33 deletions.
4 changes: 3 additions & 1 deletion ansible/playbooks/AdoptOpenJDK_AIX_Playbook/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@

# These packages are installed using installp - which can enlarge
# filesystem space, as needed, on demand
- openssl
- role: openssl3
tags: openssl3

- security

# 2. AIX BOS configuration
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
#################################################################################
# Install OpenSSL 3.0.10.1000 #
# An OpenSSL version greater than 1.1.x is needed for DNF #
# See https://github.com/adoptium/infrastructure/issues/3274 #
# OpenSSL 3.0.10.1000 is downloaded from this link: #
# https://www.ibm.com/resources/mrs/assets/DownloadList?source=aixbp&lang=en_US #
#################################################################################
---
- name: Check if openssl is installed
stat:
path: /usr/bin/openssl
register: openssl_installed

- name: Get version of installed openssl (if installed else skip)
shell: /usr/bin/openssl version | awk '{print$2}' | awk -F. '{print$1}'
register: openssl_version
when: openssl_installed.stat.exists

- name: Install openssl if not installed or version is less than 3
when: (not openssl_installed.stat.exists) or ((openssl_version.stdout | int) < 3)
block:
- name: Transfer openssl binary
unarchive:
src: /Vendor_Files/aix/openssl-3.0.10.1000.tar.Z
dest: /tmp/
remote_src: false

- name: Install openssl files
shell: PATH=/usr/bin/:$PATH && cd /tmp/openssl-3.0.10.1000 && installp -qaXFY -d . openssl.base openssl.license openssl.man.en_US

- name: Update AIX-rpm package
shell: PATH=/usr/bin/:$PATH && /usr/sbin/updtvpkg

- name: Remove openssl directory and binary
file:
path: "{{ item }}"
state: absent
with_items:
- /tmp/openssl-3.0.10.1000.tar.Z
- /tmp/openssl-3.0.10.1000.tar
- /tmp/openssl-3.0.10.1000

0 comments on commit a12cf0f

Please sign in to comment.