diff --git a/openjdk/defaults/main.yml b/openjdk/defaults/main.yml index d001c13..f656227 100644 --- a/openjdk/defaults/main.yml +++ b/openjdk/defaults/main.yml @@ -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 diff --git a/openjdk/tasks/main.yml b/openjdk/tasks/main.yml index c64cf22..45fe016 100644 --- a/openjdk/tasks/main.yml +++ b/openjdk/tasks/main.yml @@ -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 }}'