From 3826c28cf387fdbd264e08a5d39276095553231b Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Tue, 7 May 2019 12:02:15 +0200 Subject: [PATCH] When we use the openjdk from the Zulu repo, remove the openjdk distribution packages. --- openjdk/tasks/main.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/openjdk/tasks/main.yml b/openjdk/tasks/main.yml index 3e66b37..5c6c097 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' ]