Skip to content

Commit

Permalink
Move Java tasks into a new Java role
Browse files Browse the repository at this point in the history
  • Loading branch information
James Conroy-Finn committed Nov 12, 2014
1 parent 7e906bd commit a81307c
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 15 deletions.
1 change: 1 addition & 0 deletions dotfiles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
- { role: vim, tags: ['vim'] }
- { role: ssh, tags: ['ssh'] }
- { role: code, tags: ['code'] }
- { role: java, tags: ['java'] }
- { role: clojure, tags: ['clojure'] }
- { role: erlang, tags: ['erlang'] }
- { role: haskell, tags: ['haskell'] }
Expand Down
15 changes: 0 additions & 15 deletions roles/clojure/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,4 @@
---
- name: Install jenv
git: >
repo=git://github.com/gcuisinier/jenv.git
dest=~/.jenv
tags: update

- name: Register all JVMs
shell: 'jenv add {{ item }}/Contents/Home'
with_fileglob:
- /Library/Java/JavaVirtualMachines/*

- name: Set current JVM
shell: 'jenv global {{ dotfiles.jvm.version }}'
ignore_errors: yes

- name: Create ~/.bin
file: dest=~/.bin state=directory

Expand Down
38 changes: 38 additions & 0 deletions roles/java/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
- name: Install jenv
git: >
repo=git://github.com/gcuisinier/jenv.git
dest=~/.jenv
tags: update

# From http://support.apple.com/kb/dl1572
- name: Install Java 6
mac_pkg: >
pkg_name=com.apple.pkg.JavaForMacOSX107 pkg_version=1.0.0.0.1.1247562015
url=http://support.apple.com/downloads/DL1572/en_US/JavaForOSX2013-05.dmg
archive_type=dmg archive_path=JavaForOSX.pkg
- name: Install Java 7
mac_pkg: >
pkg_name=com.oracle.jdk7u51 pkg_version=1.1
url=http://download.oracle.com/otn-pub/java/jdk/7u51-b13/jdk-7u51-macosx-x64.dmg
curl_opts="-L --cookie oraclelicense=accept-securebackup-cookie"
archive_type=dmg archive_path='JDK 7 Update 51.pkg'
sudo: yes

- name: Install Java 8
mac_pkg: >
pkg_name=com.oracle.jdk8u25 pkg_version=1.1
url=http://download.oracle.com/otn-pub/java/jdk/8u25-b17/jdk-8u25-macosx-x64.dmg
curl_opts="-L --cookie oraclelicense=accept-securebackup-cookie"
archive_type=dmg archive_path='JDK 8 Update 25.pkg'
sudo: yes

- name: Register all JVMs
shell: 'jenv add {{ item }}/Contents/Home'
with_fileglob:
- /Library/Java/JavaVirtualMachines/*

- name: Set current JVM
shell: 'jenv global {{ dotfiles.jvm.version }}'
ignore_errors: yes

0 comments on commit a81307c

Please sign in to comment.