Ansible roles by Evolix
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

27 lines
701 B

---
- name: Decide which Debian release to use
set_fact:
java8_apt_release: '{% if ansible_distribution_release == "jessie" %}jessie-backports{% else %}{{ ansible_distribution_release }}{% endif %}'
- name: install jessie-backports
include_role:
name: apt
tasks_from: backports.yml
when: ansible_distribution_release == "jessie"
- name: Java 8 is installed
apt:
name: openjdk-8-jre-headless
default_release: "{{ java8_apt_release }}"
state: present
tags:
- java
- packages
- name: Java 8 is the default alternative
alternatives:
name: java
path: /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java
when: java8_default_alternative
tags:
- java