Skip to content

Commit

Permalink
Merge pull request #1 from georgecodes/install-on-osx-with-downloaded…
Browse files Browse the repository at this point in the history
…-dmg

Install on osx with downloaded dmg
  • Loading branch information
srsp authored Jul 25, 2017
2 parents ae9060c + 0f15e8d commit 7581db8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`:

Expand Down
8 changes: 7 additions & 1 deletion tasks/install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 7581db8

Please sign in to comment.