Skip to content

Commit

Permalink
Merge pull request #118 from ansiblebit/develop
Browse files Browse the repository at this point in the history
support for JDK12
  • Loading branch information
steenzout authored May 20, 2019
2 parents 44d58ed + 97a6b46 commit 65a4d01
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 21 deletions.
35 changes: 25 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,14 @@ DISCLAIMER: usage of any version of this role implies you have accepted the
- **oracle_java_set_as_default**: flag to indicate if this play should set Java as default (default: `yes`).
- **oracle_java_use_defaults**: flag to indicate you want to use defaults set in the `defaults` directory (default: `yes`).
**WARNING**. setting this to `no` will require the user to pass all of the distribution variables.
See `* | Java 8` examples in the _Playbooks_ section.
See `* | Java 11` examples in the _Playbooks_ section.

### Debian

**WARNING** to override **any** of the following variables (even if it's only one),
you'll need to set `oracle_java_use_defaults: no` and override **all** of their values since
OS family defaults will no longer be loaded.
See `debian | Java 8` example in the _Playbooks_ section.
See `debian | Java 11` example in the _Playbooks_ section.

- **oracle_java_apt_repository**: Personal Package Archive (PPA) from where to install Java.
- **oracle_java_apt_repository_key**: PPA repository key.
Expand All @@ -69,7 +69,7 @@ See `debian | Java 8` example in the _Playbooks_ section.
**WARNING** to override **any** of the following variables (even if it's only one),
you'll need to set `oracle_java_use_defaults: no` and override **all** of their values since
OS family defaults will no longer be loaded.
See `debian | ubuntu | Java 8` example in the _Playbooks_ section.
See `debian | ubuntu | Java 11` example in the _Playbooks_ section.

- **oracle_java_apt_repository**: Personal Package Archive (PPA) from where to install Java.
- **oracle_java_cache_valid_time**: the amount of time in seconds the apt cache is valid.
Expand All @@ -84,7 +84,7 @@ See `debian | ubuntu | Java 8` example in the _Playbooks_ section.
**WARNING** to override **any** of the following variables (even if it's only one),
you'll need to set `oracle_java_use_defaults: no` and override **all** of their values since
OS family defaults will no longer be loaded.
See `redhat | centos 7 | Java Other` example in the _Playbooks_ section.
See `redhat | centos 7 | Java 11` example in the _Playbooks_ section.

- **oracle_java_dir_source**: directory where to store the RPM files.
- **oracle_java_download_timeout**: download timeout, in seconds.
Expand All @@ -102,40 +102,56 @@ See `redhat | centos 7 | Java Other` example in the _Playbooks_ section.
roles:
- role: ansiblebit.oracle-java

# debian | Java 12
- hosts: servers
roles:
- role: ansiblebit.oracle-java

# debian | Java 11
- hosts: servers
roles:
- role: ansiblebit.oracle-java
oracle_java_deb_package: 'oracle-java11-installer'
oracle_java_debconf_package_default: 'oracle-java11-set-default'
oracle_java_home: "/usr/lib/jvm/java-11-oracle"

## explicitely passing default parameters
- hosts: servers
roles:
- role: ansiblebit.oracle-java

# debian | ubuntu | Java 12
- hosts: servers
roles:
- role: ansiblebit.oracle-java

# debian | ubuntu | Java 11
- hosts: servers
roles:
- role: ansiblebit.oracle-java
oracle_java_deb_package: 'oracle-java11-installer'
oracle_java_debconf_package_default: 'oracle-java11-set-default'
oracle_java_home: "/usr/lib/jvm/java-11-oracle"

# redhat | centos 7 | Java 11
# redhat | centos 7 | Java 12
- hosts: servers
roles:
- role: ansiblebit.oracle-java

# redhat | centos 7 | Java Other
# redhat | centos 7 | Java 11
- hosts: servers
roles:
- role: ansiblebit.oracle-java
oracle_java_use_defaults: no
oracle_java_dir_source: '/usr/local/src'
oracle_java_download_timeout: 60
oracle_java_rpm_filename: 'jdk-8u201-linux-x64.rpm'
oracle_java_rpm_filename: 'jdk-11.0.3_linux-x64_bin.rpm'
oracle_java_home: '/usr/java/default'
oracle_java_os_supported: yes
oracle_java_rpm_url: 'https://download.oracle.com/path/to/file.rpm'
oracle_java_rpm_url: 'https://download.oracle.com/otn/java/jdk/11.0.3+12/37f5e150db5247ab9333b11c1dddcd30/jdk-11.0.3_linux-x64_bin.rpm'
oracle_java_rpm_validate_certs: yes
oracle_java_set_as_default: no
oracle_java_version_string: 1.8.0_201
oracle_java_version_string: 11.0.3
```
Use `--skip-tags=debug` if you want to suppress debug information.
Expand Down Expand Up @@ -175,5 +191,4 @@ vagrant destroy bionic64.vagrant.dev

## Links

- [launchpad > WebUpd8 > Oracle Java (JDK) 8 / 9 Installer PPA](https://launchpad.net/~webupd8team/+archive/ubuntu/java)
- [launchpad > Linux Uprising > Oracle Java](https://launchpad.net/~linuxuprising/+archive/ubuntu/java)
6 changes: 3 additions & 3 deletions defaults/debian-ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

oracle_java_apt_repository: 'ppa:linuxuprising/java'
oracle_java_cache_valid_time: 3600
oracle_java_deb_package: 'oracle-java11-installer'
oracle_java_debconf_package_default: 'oracle-java11-set-default'
oracle_java_home: "/usr/lib/jvm/java-11-oracle"
oracle_java_deb_package: 'oracle-java12-installer'
oracle_java_debconf_package_default: 'oracle-java12-set-default'
oracle_java_home: "/usr/lib/jvm/java-12-oracle"
oracle_java_license_version: 'shared/accepted-oracle-license-v1-2'
oracle_java_state: latest
6 changes: 3 additions & 3 deletions defaults/debian.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
oracle_java_apt_repository: 'deb http://ppa.launchpad.net/linuxuprising/java/ubuntu bionic main'
oracle_java_apt_repository_key: 'EA8CACC073C3DB2A'
oracle_java_cache_valid_time: 3600
oracle_java_deb_package: 'oracle-java11-installer'
oracle_java_debconf_package_default: 'oracle-java11-set-default'
oracle_java_home: "/usr/lib/jvm/java-11-oracle"
oracle_java_deb_package: 'oracle-java12-installer'
oracle_java_debconf_package_default: 'oracle-java12-set-default'
oracle_java_home: "/usr/lib/jvm/java-12-oracle"
oracle_java_license_version: 'shared/accepted-oracle-license-v1-2'
oracle_java_state: latest
8 changes: 4 additions & 4 deletions defaults/redhat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@

oracle_java_dir_source: '/usr/local/src'
oracle_java_download_timeout: 60
oracle_java_rpm_filename: 'jdk-11.0.2_linux-x64_bin.rpm'
oracle_java_rpm_filename: 'jdk-12.0.1_linux-x64_bin.rpm'
oracle_java_home: '/usr/java/default'
oracle_java_rpm_url: 'http://download.oracle.com/otn-pub/java/jdk/11.0.2+9/f51449fcd52f4d52b93a989c5c56ed3c/jdk-11.0.2_linux-x64_bin.rpm'
oracle_java_rpm_url: 'https://download.oracle.com/otn-pub/java/jdk/12.0.1+12/69cfe15208a647278a19ef0990eea691/jdk-12.0.1_linux-x64_bin.rpm'
oracle_java_rpm_validate_certs: yes
oracle_java_version: 11
oracle_java_version_string: 11.0.2
oracle_java_version: 12
oracle_java_version_string: 12.0.1
2 changes: 1 addition & 1 deletion tests/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
gather_facts: yes
vars:
debug: yes
test_expected_java_version: '11.0.2'
test_expected_java_version: '12.0.1'

roles:
- role: oracle-java
Expand Down

0 comments on commit 65a4d01

Please sign in to comment.