2015-05-28 11:32:57 +02:00
|
|
|
---
|
|
|
|
- name: Update the apt cache, if needed
|
|
|
|
apt: update_cache=yes
|
|
|
|
when: openjdk_pkg_state == 'latest'
|
2016-03-10 20:32:04 +01:00
|
|
|
tags: jdk
|
2015-05-28 11:32:57 +02:00
|
|
|
|
|
|
|
- name: install OpenJDK JRE
|
|
|
|
apt: pkg=openjdk-{{ item.0 }}-{{ item[1] }} state={{ openjdk_pkg_state }}
|
|
|
|
with_nested:
|
2016-03-10 20:32:04 +01:00
|
|
|
- '{{ openjdk_version }}'
|
2015-05-28 11:32:57 +02:00
|
|
|
- [ 'jre', 'jre-headless', 'jdk' ]
|
2016-03-10 20:32:04 +01:00
|
|
|
notify: Set the default OpenJDK
|
|
|
|
tags: jdk
|
2015-05-28 11:32:57 +02:00
|
|
|
|
|
|
|
- name: Set fact jdk_installed
|
|
|
|
set_fact: jdk_installed=true
|
2016-03-10 20:32:04 +01:00
|
|
|
tags: jdk
|
2015-05-28 11:32:57 +02:00
|
|
|
|