From 3e399a96689fc102dc1c7a1e142c25a99b36b5f3 Mon Sep 17 00:00:00 2001 From: George McIntosh Date: Thu, 20 Jul 2017 09:43:57 +0100 Subject: [PATCH 1/2] Allowed for installation on OSX using pre-fetched package --- tasks/install.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tasks/install.yml b/tasks/install.yml index cfd0e40..a1aaf9e 100644 --- a/tasks/install.yml +++ b/tasks/install.yml @@ -20,7 +20,13 @@ 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_os_family != "Darwin" + + - name: copy .dmg from local + copy: + src: "{{ playbook_dir }}/files/{{ jdk_tarball_file }}.dmg" + dest: "{{ java_download_path }}/{{ jdk_tarball_file }}.dmg" + when: ansible_pkg_mgr != "yum" and ansible_pkg_mgr != "zypper" and ansible_os_family == "Darwin" when: not java_download_from_oracle From 0f15e8dd21b3f111cbf7841a7cddb609fe085511 Mon Sep 17 00:00:00 2001 From: George McIntosh Date: Thu, 20 Jul 2017 09:47:03 +0100 Subject: [PATCH 2/2] Updated documentation to reflect change --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 82175f0..7c50be4 100644 --- a/README.md +++ b/README.md @@ -123,9 +123,9 @@ Simple example: ``` -### (Optionally) pre-fetch .rpm and .tar.gz files +### (Optionally) pre-fetch .rpm, .tar.gz or .dmg files -For some reasons, you may want to pre-fetch .rpm and .tar.gz files *before the execution of this role*, instead of downloading from Oracle on-the-fly. +For some reasons, you may want to pre-fetch .rpm, .tar.gz or .dmg files *before the execution of this role*, instead of downloading from Oracle on-the-fly. To do this, put the file on the `{{ playbook_dir }}/files` directory in advance, and then set the `java_download_from_oracle` variable to `false`: