OpenJDK: remove the Oracle JDK packages, if there are any.

This commit is contained in:
Andrea Dell'Amico 2019-05-02 11:29:17 +02:00
parent 65dbfd8bee
commit b00926c1d5
2 changed files with 17 additions and 2 deletions

View File

@ -21,3 +21,11 @@ openjdk_pkgs:
# - jdk
oracle_jdk_ubuntu_ppa: 'ppa:webupd8team/java'
openjdk_oracle_jdk_pkgs:
- oracle-java7-installer
- oracle-java7-set-default
- oracle-java7-unlimited-jce-policy
- oracle-java8-installer
- oracle-java8-set-default
- oracle-java8-unlimited-jce-policy

View File

@ -4,8 +4,8 @@
apt_repository: repo='{{ dismissed_openjdk_ppa }}' update_cache=yes state=absent
- name: Remove the Oracle JDK PPA
apt_repository: repo='{{ oracle_jdk_ubuntu_ppa }}' state=absent
apt_repository: repo='{{ oracle_jdk_ubuntu_ppa }}' state=absent update_cache=yes
- name: Check if we must use the Zulu repository
set_fact:
openjdk_zulu_repo_install: True
@ -64,3 +64,10 @@
when: openjdk_installed is changed
tags: [ 'jdk', 'openjdk' ]
- block:
- name: Remove the Oracle JDK packages
apt: pkg={{ openjdk_oracle_jdk_pkgs }} state=absent cache_valid_time=3600
tags: [ 'jdk', 'openjdk' ]