forked from ISTI-ansible-roles/ansible-roles
Fix the OpenJDK playbook.
This commit is contained in:
parent
b4cb0771c8
commit
0dc8227536
|
@ -9,7 +9,7 @@ openjdk_ppa: 'ppa:openjdk-r/ppa'
|
|||
jdk_java_home: '/usr/lib/jvm/java-{{ openjdk_default }}-openjdk-amd64'
|
||||
|
||||
openjdk_pkgs:
|
||||
- jre
|
||||
- jdk
|
||||
# - jre-headless
|
||||
# - jdk-headless
|
||||
- jre-headless
|
||||
- jdk-headless
|
||||
# - jre
|
||||
# - jdk
|
||||
|
|
|
@ -3,12 +3,8 @@
|
|||
- name: Add the openjdk ppa. To have openjdk 8/9 on precise and trusty
|
||||
apt_repository: repo='{{ openjdk_ppa }}' update_cache=yes
|
||||
|
||||
- name: Update the apt cache, if needed
|
||||
apt: update_cache=yes cache_valid_time=1800
|
||||
when: openjdk_pkg_state == 'latest'
|
||||
|
||||
- name: install OpenJDK JRE
|
||||
apt: pkg=openjdk-{{ item.0 }}-{{ item[1] }} state={{ openjdk_pkg_state }}
|
||||
apt: pkg=openjdk-{{ item.0 }}-{{ item[1] }} state={{ openjdk_pkg_state }} update_cache=yes cache_valid_time=3600
|
||||
with_nested:
|
||||
- '{{ openjdk_version }}'
|
||||
- '{{ openjdk_pkgs }}'
|
||||
|
|
Loading…
Reference in New Issue