diff --git a/openjdk/tasks/main.yml b/openjdk/tasks/main.yml index 3e66b374..5c6c0975 100644 --- a/openjdk/tasks/main.yml +++ b/openjdk/tasks/main.yml @@ -69,5 +69,12 @@ - name: Remove the Oracle JDK packages apt: pkg={{ openjdk_oracle_jdk_pkgs }} state=absent cache_valid_time=3600 + - name: Remove the OpenJDK packages fthat come with the distribution when we use the Zulu repository + apt: pkg=openjdk-{{ item.0 }}-{{ item[1] }} state=absent update_cache=yes cache_valid_time=3600 + with_nested: + - '{{ openjdk_version }}' + - '{{ openjdk_pkgs }}' + when: openjdk_zulu_repo_install + tags: [ 'jdk', 'openjdk' ]