forked from ISTI-ansible-roles/ansible-roles
19 lines
429 B
YAML
19 lines
429 B
YAML
---
|
|
- name: Update the apt cache, if needed
|
|
apt: update_cache=yes
|
|
when: openjdk_pkg_state == 'latest'
|
|
tags: jdk
|
|
|
|
- name: install OpenJDK JRE
|
|
apt: pkg=openjdk-{{ item.0 }}-{{ item[1] }} state={{ openjdk_pkg_state }}
|
|
with_nested:
|
|
- '{{ openjdk_version }}'
|
|
- [ 'jre', 'jre-headless', 'jdk' ]
|
|
notify: Set the default OpenJDK
|
|
tags: jdk
|
|
|
|
- name: Set fact jdk_installed
|
|
set_fact: jdk_installed=true
|
|
tags: jdk
|
|
|