Skip to content
Snippets Groups Projects
Commit 9704b9d3 authored by jurgenhaas's avatar jurgenhaas
Browse files

#1 Use OpenJDK on Ubuntu 18

parent b696b969
No related branches found
No related tags found
No related merge requests found
---
# file: roles/java/tasks/install-16.yml
- name: 'Apt Key'
apt_key:
url='https://keyserver.ubuntu.com/pks/lookup?op=get&search=0xEA8CACC073C3DB2A'
state=present
- name: "Apt Repository"
apt_repository:
repo='deb http://ppa.launchpad.net/{{ java_repo }}/java/ubuntu {{ ansible_distribution_release }} main'
state='present'
mode='644'
- name: "Accept License"
shell: '{{ item }}'
with_items:
- 'echo debconf shared/accepted-oracle-license-{{ java_license }} select true | /usr/bin/debconf-set-selections'
- 'echo debconf shared/accepted-oracle-license-{{ java_license }} seen true | /usr/bin/debconf-set-selections'
- name: "Install Agent"
apt:
pkg='oracle-java{{ java_version }}-installer'
state='present'
update_cache=yes
force=yes
---
# file: roles/java/tasks/install-18.yml
- name: "Install Agent"
apt:
pkg='openjdk-11-jre'
state='present'
update_cache=yes
force=yes
......@@ -7,28 +7,6 @@
- block:
- name: 'Apt Key'
apt_key:
url='https://keyserver.ubuntu.com/pks/lookup?op=get&search=0xEA8CACC073C3DB2A'
state=present
- name: "Apt Repository"
apt_repository:
repo='deb http://ppa.launchpad.net/{{ java_repo }}/java/ubuntu {{ ansible_distribution_release }} main'
state='present'
mode='644'
- name: "Accept License"
shell: '{{ item }}'
with_items:
- 'echo debconf shared/accepted-oracle-license-{{ java_license }} select true | /usr/bin/debconf-set-selections'
- 'echo debconf shared/accepted-oracle-license-{{ java_license }} seen true | /usr/bin/debconf-set-selections'
- name: "Install Agent"
apt:
pkg='oracle-java{{ java_version }}-installer'
state='present'
update_cache=yes
force=yes
- include_tasks: 'install-{{ ansible_distribution_major_version }}.yml'
when: '"java" not in excluded_roles'
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment