-
-
Notifications
You must be signed in to change notification settings - Fork 100
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
unixPB: add adoptium openjdk devkit install
Signed-off-by: Stewart X Addison <sxa@redhat.com>
- Loading branch information
Showing
5 changed files
with
112 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
53 changes: 53 additions & 0 deletions
53
ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/devkit/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,53 @@ | ||
--- | ||
################################ | ||
# Adoptium devkit installation # | ||
################################ | ||
|
||
- name: Check if devkit {{ devkit_version }} is installed | ||
shell: /usr/local/devkit/{{ devkit_version }}/bin/gcc --version 2>&1 > /dev/null | ||
failed_when: false | ||
register: devkit_installed | ||
changed_when: False | ||
tags: devkit | ||
|
||
- name: Set filename of devkit tarball | ||
set_fact: | ||
Check failure on line 14 in ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/devkit/tasks/main.yml
|
||
devkit_filename: devkit-{{ devkit_version|replace('-b','-{{ ansible_architecture }}-linux-gnu-b') }}.tar.xz | ||
Check warning on line 15 in ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/devkit/tasks/main.yml
|
||
when: | ||
- devkit_installed.rc != 0 | ||
tags: devkit | ||
|
||
- name: Download {{ devkit_filename }} | ||
get_url: | ||
url: https://github.com/adoptium/devkit-binaries/releases/download/{{ devkit_version }}/{{ devkit_filename }} | ||
dest: /tmp/devkit.tar.xz | ||
force: no | ||
mode: 0644 | ||
checksum: "sha256:{{ lookup('vars', 'csum_' + ansible_architecture) }}" | ||
when: | ||
- devkit_installed.rc != 0 | ||
tags: devkit | ||
|
||
# Perhaps this should have the `b01` removed ... Or use a symlink? | ||
- name: Create /usr/local/devkit/{{ devkit_version }} | ||
ansible.builtin.file: | ||
path: /usr/local/devkit/{{ devkit_version }} | ||
state: directory | ||
mode: '0755' | ||
|
||
- name: Extract {{ devkit_filename }} to /usr/local/devkit | ||
unarchive: | ||
src: /tmp/devkit.tar.xz | ||
dest: /usr/local/devkit/{{ devkit_version }} | ||
copy: False | ||
when: | ||
- devkit_installed.rc != 0 | ||
tags: devkit | ||
|
||
- name: Remove tarball | ||
file: | ||
path: '/tmp/devkit.tar.xz' | ||
state: absent | ||
when: | ||
- devkit_installed.rc != 0 | ||
tags: devkit |
43 changes: 43 additions & 0 deletions
43
ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/devkit/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,43 @@ | ||
--- | ||
########## | ||
# gcc_11 # | ||
########## | ||
|
||
- name: Check if gcc 11.2 is installed on RHEL/CentOS/Ubuntu16 | ||
shell: /usr/local/gcc11/bin/gcc-11.2 --version 2>&1 > /dev/null | ||
failed_when: false | ||
register: gcc11_installed | ||
when: ansible_distribution == "RedHat" or ansible_distribution == "Fedora" or ansible_distribution == "CentOS" or ansible_distribution == "openSUSE" or (ansible_architecture == "armv7l" and ((ansible_distribution == "Ubuntu" and ansible_distribution_major_version == "16") or ansible_distribution == "Debian")) | ||
changed_when: False | ||
tags: gcc_11 | ||
|
||
- name: Download Adoptium gcc-11.2 binary | ||
get_url: | ||
url: https://ci.adoptium.net/userContent/gcc/gcc112.{{ ansible_architecture }}.tar.xz | ||
dest: '/tmp/ansible-adoptopenjdk-gcc-11.tar.xz' | ||
force: no | ||
mode: 0644 | ||
checksum: "sha256:{{ lookup('vars', 'csum_' + ansible_architecture) }}" | ||
when: | ||
- ansible_distribution == "RedHat" or ansible_distribution == "Fedora" or ansible_distribution == "CentOS" or ansible_distribution == "openSUSE" or (ansible_architecture == "armv7l" and ((ansible_distribution == "Ubuntu" and ansible_distribution_major_version == "16") or ansible_distribution == "Debian")) | ||
- gcc11_installed.rc != 0 | ||
tags: gcc_11 | ||
|
||
- name: Extract AdoptOpenJDK gcc-11 binary to /usr/local/gcc11 | ||
unarchive: | ||
src: /tmp/ansible-adoptopenjdk-gcc-11.tar.xz | ||
dest: /usr/local/ | ||
copy: False | ||
when: | ||
- ansible_distribution == "RedHat" or ansible_distribution == "Fedora" or ansible_distribution == "CentOS" or ansible_distribution == "openSUSE" or (ansible_architecture == "armv7l" and ((ansible_distribution == "Ubuntu" and ansible_distribution_major_version == "16") or ansible_distribution == "Debian")) | ||
- gcc11_installed.rc != 0 | ||
tags: gcc_11 | ||
|
||
- name: Remove downloaded gcc 11 binary tarball | ||
file: | ||
path: '/tmp/ansible-adoptopenjdk-gcc-11.tar.xz' | ||
state: absent | ||
when: | ||
- ansible_distribution == "RedHat" or ansible_distribution == "Fedora" or ansible_distribution == "CentOS" or ansible_distribution == "openSUSE" or (ansible_architecture == "armv7l" and ((ansible_distribution == "Ubuntu" and ansible_distribution_major_version == "16") or ansible_distribution == "Debian")) | ||
- gcc11_installed.rc != 0 | ||
tags: gcc_11 |
4 changes: 4 additions & 0 deletions
4
ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/devkit/vars/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,4 @@ | ||
--- | ||
csum_x86_64: 234df9f9dfad20c329c6a45491e0640c4fe6075d049aca37a19cec886e0efbe9 | ||
csum_aarch64: 2870ab4859cc15b98cbaebf72011789171406d6b54770f95d862fd51e9815ae5 | ||
csum_ppc64le: e32c36e8471527ba94c2a9738ae9f569b126376bc6edabad28ecf4e2771d2810 |
6 changes: 6 additions & 0 deletions
6
ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/devkit/vars/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,6 @@ | ||
--- | ||
csum_x86_64: c59bde6e2b594fb127c1f7fa82a0f95b0b6bb17fcd7631f65d3963109e311f7c | ||
csum_aarch64: 5b7e0cb839b74ebe769557dae157fcbff5f7bcf2885003cc528fb65cd922b66c | ||
csum_armv7l: a9f5d487243cd9d531a0c285275a3b518c30457bcec6d1fc9de4f8a109268bd8 | ||
csum_ppc64le: fd84b3b5b2593762b837c74fe3f410d9d2ae73539eb2f4334da344449ed0e6fc | ||
csum_s390x: eb8cae5f49f405ae32140860d67a90813d9d21614afd2c4dd7dfd565c5e2ea69 |