-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from idealista/develop
Develop
- Loading branch information
Showing
12 changed files
with
197 additions
and
80 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,4 @@ tests/.cache | |
tests/__pycache__ | ||
.molecule | ||
.vagrant | ||
.cache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,13 @@ | ||
# Change Log | ||
All notable changes to this project will be documented in this file. | ||
This project adheres to [Semantic Versioning](http://semver.org/) and [Keep a changelog](https://github.com/olivierlacan/keep-a-changelog). | ||
|
||
## [Unreleased] | ||
## [Unreleased](https://github.com/idealista/java-role/tree/develop) | ||
|
||
## [1.0.0] | ||
## [1.1.0](https://github.com/idealista/java-role/tree/1.1.0) | ||
### Added | ||
- *Enable openjdk* @jmonterrubio | ||
|
||
## [1.0.0](https://github.com/idealista/java-role/tree/1.0.0) | ||
### Added | ||
- *First commit* @agarcia |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
--- | ||
java_repo: 'deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main' | ||
java_ppa: 'webupd8team/java' | ||
java_version: '8' | ||
java_set_version: '8' | ||
## GLOBAL | ||
java_version: 8 | ||
java_set_version: 8 | ||
|
||
# IMPLEMENTATION | ||
java_implementation: oracle # [oracle, openjdk] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
--- | ||
|
||
- name: JAVA | Debian repo key | ||
apt_repository: | ||
repo: "{{ java_repo_openjdk }}" | ||
when: ansible_distribution in [ 'Debian' ] | ||
|
||
- name: JAVA | Installing dependencies | ||
apt: | ||
pkg: "{{ item }}" | ||
update_cache: yes | ||
state: present | ||
default_release: jessie-backports | ||
with_items: "{{ required_libs_openjdk }}" | ||
|
||
- name: JAVA | Install Java | ||
apt: | ||
name: "openjdk-{{ item }}-jdk" | ||
state: present | ||
update_cache: yes | ||
default_release: jessie-backports | ||
with_items: "{{ java_version }}" | ||
|
||
- name: JAVA | Update Env | ||
alternatives: | ||
name: java | ||
path: "/usr/lib/jvm/java-{{ java_set_version }}-openjdk-amd64/jre/bin/java" | ||
#command: update-java-alternatives --set java-1.{{ java_set_version }}.0-openjdk-amd64 | ||
|
||
- name: JAVA | Ensure Defaults on etc/alternatives systems | ||
file: | ||
src: /usr/lib/jvm/java-{{ java_set_version }}-openjdk-amd64 | ||
dest: /usr/lib/jvm/default-java | ||
force: yes | ||
state: link |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
--- | ||
- name: Debian repo | ||
apt_key: | ||
keyserver: hkp://keyserver.ubuntu.com:80 | ||
id: EEA14886 | ||
when: ansible_distribution in [ 'Debian' ] | ||
|
||
- name: Debian repo key | ||
apt_repository: | ||
repo: "{{ java_repo_oracle }}" | ||
when: ansible_distribution in [ 'Debian' ] | ||
|
||
- name: Add Java ppa to Ubuntu | ||
apt_repository: | ||
repo: ppa:{{ java_ppa_oracle }} | ||
when: ansible_distribution in [ 'Ubuntu' ] | ||
|
||
- name: Autoaccept license for Java | ||
debconf: | ||
name: oracle-java{{ item }}-installer | ||
question: shared/accepted-oracle-license-v1-1 | ||
value: 'true' | ||
vtype: select | ||
with_items: "{{ java_version }}" | ||
|
||
- name: Install Java | ||
apt: | ||
pkg: oracle-java{{ item }}-installer | ||
state: present | ||
install_recommends: yes | ||
update_cache: yes | ||
cache_valid_time: 3600 | ||
with_items: "{{ java_version }}" | ||
tags: skip_ansible_lint | ||
|
||
- name: Set Java Env | ||
apt: | ||
pkg: oracle-java{{ java_set_version }}-set-default | ||
state: present | ||
install_recommends: yes | ||
update_cache: yes | ||
cache_valid_time: 3600 | ||
tags: skip_ansible_lint | ||
|
||
- name: Ensure Defaults on etc/alternatives systems | ||
file: | ||
src: /usr/lib/jvm/java-{{ java_set_version }}-oracle | ||
dest: /usr/lib/jvm/default-java | ||
force: yes | ||
state: link |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,50 +1,13 @@ | ||
--- | ||
- name: Debian repo | ||
apt_key: | ||
keyserver: hkp://keyserver.ubuntu.com:80 | ||
id: EEA14886 | ||
when: ansible_distribution in [ 'Debian' ] | ||
|
||
- name: Debian repo key | ||
apt_repository: | ||
repo: "{{ java_repo }}" | ||
when: ansible_distribution in [ 'Debian' ] | ||
|
||
- name: Add Java ppa to Ubuntu | ||
apt_repository: | ||
repo: ppa:{{ java_ppa }} | ||
when: ansible_distribution in [ 'Ubuntu' ] | ||
|
||
- name: Autoaccept license for Java | ||
debconf: | ||
name: oracle-java{{ item }}-installer | ||
question: shared/accepted-oracle-license-v1-1 | ||
value: 'true' | ||
vtype: select | ||
with_items: "{{ java_version }}" | ||
|
||
- name: Install Java | ||
apt: | ||
pkg: oracle-java{{ item }}-installer | ||
state: latest | ||
install_recommends: yes | ||
update_cache: yes | ||
cache_valid_time: 3600 | ||
with_items: "{{ java_version }}" | ||
tags: skip_ansible_lint | ||
|
||
- name: Set Java Env | ||
apt: | ||
pkg: oracle-java{{ java_set_version }}-set-default | ||
state: latest | ||
install_recommends: yes | ||
update_cache: yes | ||
cache_valid_time: 3600 | ||
tags: skip_ansible_lint | ||
|
||
- name: Ensure Defaults on etc/alternatives systems | ||
file: | ||
src: /usr/lib/jvm/java-{{ java_set_version }}-oracle | ||
dest: /usr/lib/jvm/default-java | ||
force: yes | ||
state: link | ||
- name: JAVA | Install Oracle Implementation | ||
include: install_oracle.yml | ||
when: java_implementation == 'oracle' | ||
tags: | ||
- install | ||
|
||
- name: JAVA | Install OpenJDK Implementation | ||
include: install_openjdk.yml | ||
when: java_implementation == 'openjdk' | ||
tags: | ||
- install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
|
||
java_version: [7,8] | ||
|
||
java_set_version: 7 | ||
|
||
java_implementation: openjdk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
|
||
java_version: [6, 7, 8] | ||
java_set_version: 7 | ||
|
||
java_implementation: oracle |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- | ||
|
||
required_libs_oracle: [] | ||
java_repo_oracle: "deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" | ||
java_ppa_oracle: "webupd8team/java" | ||
|
||
required_libs_openjdk: | ||
- ca-certificates-java | ||
- openjdk-8-jre-headless | ||
java_repo_openjdk: "deb http://http.debian.net/debian jessie-backports main" |