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

Close #52: support for raspbian distro based install on Arm added #53

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
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
11 changes: 7 additions & 4 deletions tasks/install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
copy:
src: "{{ playbook_dir }}/files/{{ jdk_tarball_file }}.tar.gz"
dest: "{{ java_download_path }}/{{ jdk_tarball_file }}.tar.gz"
when: ansible_pkg_mgr != "yum" and ansible_pkg_mgr != "zypper"
when: ansible_pkg_mgr != "yum" and ansible_pkg_mgr != "zypper" and ansible_architecture != "armv7l"

- name: copy JCE zip from local
copy:
Expand All @@ -31,14 +31,17 @@
when: not java_download_from_oracle


- name: delegate to APT installation process
include: use-apt.yml
when: ansible_pkg_mgr == "apt" and ansible_architecture == "armv7l"

- name: delegate to RPM installation process
include: use-rpm.yml
when: (ansible_pkg_mgr == "yum" or ansible_pkg_mgr == "zypper") and ansible_os_family != 'Darwin'

- name: delegate to raw tarball installation process
include: use-tarball.yml
when: ansible_pkg_mgr != "yum" and ansible_pkg_mgr != "zypper" and ansible_os_family != 'Darwin'
when: ansible_pkg_mgr != "yum" and ansible_pkg_mgr != "zypper" and ansible_os_family != 'Darwin' and ansible_architecture != "armv7l"

- name: delegate to Mac OS X dmg installation
include: use-dmg.yml
Expand Down Expand Up @@ -66,7 +69,7 @@

- block:

# No link creation is necessary on Mac OS X --
# No link creation is necessary on Mac OS X --
# the package installer automatically creates symlinks in /usr/bin.

- name: link "{{ java_install_dir }}/{{ java_default_link_name }}"
Expand Down Expand Up @@ -104,7 +107,7 @@
path: "{{ java_install_dir }}/{{ java_default_link_name }}"
when: filecheck and filecheck.stat.exists

when: ansible_os_family != "Darwin"
when: ansible_os_family != "Darwin" and ansible_architecture != "armv7l"



Expand Down
12 changes: 12 additions & 0 deletions tasks/set-role-variables.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,18 @@
set_fact:
jdk_version: "1.{{ java_version }}.0_{{ java_subversion }}"

#
# Specific preparation to support Raspbian (on ARM7)
#
- name: Select Java To Installation (Oracle Download)
set_fact:
java_download_from_oracle: true
when: ansible_architecture != "armv7l"

- name: Select Java To Installation (Distribution Install)
set_fact:
java_download_from_oracle: false
when: ansible_architecture == "armv7l" and ansible_os_family == "Debian" and ansible_pkg_mgr == "apt"

#
# platform-specific variables
Expand Down
16 changes: 16 additions & 0 deletions tasks/use-apt.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
# file: use-apt.yml
# install Oracle JDK 1.x on Debian on ARM (e.G Raspian)
#

- name: install Oracle JDK 8 from apt file {{java_version}}
become: yes
become_method: sudo
apt: name=oracle-java8-jdk
when: java_version == 8

- name: install Oracle JDK 7 from apt file
become: yes
become_method: sudo
apt: name=oracle-java7-jdk
when: java_version == 7