mirror of
https://github.com/aljazceru/ansible-elasticsearch.git
synced 2025-12-18 09:34:20 +01:00
Idempotent tests - Make java install idempotent
This commit is contained in:
@@ -10,13 +10,15 @@
|
||||
when: ansible_os_family == 'RedHat'
|
||||
|
||||
- name: Debian - Ensure Java is installed
|
||||
apt: name={{ java }} state={{java_state}} update_cache=yes force=yes
|
||||
apt: name={{ java }} state={{java_state}} update_cache=yes
|
||||
when: ansible_os_family == 'Debian'
|
||||
|
||||
- command: java -version 2>&1 | grep OpenJDK
|
||||
register: open_jdk
|
||||
changed_when: false
|
||||
|
||||
#https://github.com/docker-library/openjdk/issues/19 - ensures tests pass due to java 8 broken certs
|
||||
- name: refresh the java ca-certificates
|
||||
command: /var/lib/dpkg/info/ca-certificates-java.postinst configure
|
||||
when: ansible_distribution == 'Ubuntu' and open_jdk.rc == 0
|
||||
when: ansible_distribution == 'Ubuntu' and open_jdk.rc == 0
|
||||
changed_when: false
|
||||
Reference in New Issue
Block a user