Skip to content
This repository was archived by the owner on Sep 18, 2025. It is now read-only.

Commit 7581db8

Browse files
authored
Merge pull request #1 from georgecodes/install-on-osx-with-downloaded-dmg
Install on osx with downloaded dmg
2 parents ae9060c + 0f15e8d commit 7581db8

2 files changed

Lines changed: 9 additions & 3 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,9 +123,9 @@ Simple example:
123123
```
124124
125125
126-
### (Optionally) pre-fetch .rpm and .tar.gz files
126+
### (Optionally) pre-fetch .rpm, .tar.gz or .dmg files
127127
128-
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.
128+
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.
129129
130130
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`:
131131

tasks/install.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,13 @@
2020
copy:
2121
src: "{{ playbook_dir }}/files/{{ jdk_tarball_file }}.tar.gz"
2222
dest: "{{ java_download_path }}/{{ jdk_tarball_file }}.tar.gz"
23-
when: ansible_pkg_mgr != "yum" and ansible_pkg_mgr != "zypper"
23+
when: ansible_pkg_mgr != "yum" and ansible_pkg_mgr != "zypper" and ansible_os_family != "Darwin"
24+
25+
- name: copy .dmg from local
26+
copy:
27+
src: "{{ playbook_dir }}/files/{{ jdk_tarball_file }}.dmg"
28+
dest: "{{ java_download_path }}/{{ jdk_tarball_file }}.dmg"
29+
when: ansible_pkg_mgr != "yum" and ansible_pkg_mgr != "zypper" and ansible_os_family == "Darwin"
2430

2531
when: not java_download_from_oracle
2632

0 commit comments

Comments
 (0)