Fix the Zulu repo removal.

This commit is contained in:
Andrea Dell'Amico 2021-10-05 14:57:06 +02:00
parent 703f19e543
commit 90dff095f7
Signed by: adellam
GPG Key ID: 147ABE6CEB9E20FF
1 changed files with 6 additions and 1 deletions

View File

@ -53,7 +53,12 @@
file: file:
dest: /etc/apt/sources.list.d/zulu-openjdk.list dest: /etc/apt/sources.list.d/zulu-openjdk.list
state: absent state: absent
update_cache: yes register: zulu_repo_removal
- name: Update the apt cache
apt:
update_cache: True
when: zulu_repo_removal is changed
- name: Install the OpenJDK that comes with the distribution - name: Install the OpenJDK that comes with the distribution
apt: pkg=openjdk-{{ item.0 }}-{{ item[1] }} state={{ openjdk_pkg_state }} update_cache=yes cache_valid_time=3600 apt: pkg=openjdk-{{ item.0 }}-{{ item[1] }} state={{ openjdk_pkg_state }} update_cache=yes cache_valid_time=3600