mirror of
https://github.com/aljazceru/ansible-elasticsearch.git
synced 2025-12-17 17:14:20 +01:00
Idempotent tests - Make java install idempotent
This commit is contained in:
@@ -12,6 +12,7 @@ provisioner:
|
|||||||
http_proxy: <%= ENV['HTTP_PROXY'] %>
|
http_proxy: <%= ENV['HTTP_PROXY'] %>
|
||||||
https_proxy: <%= ENV['HTTPS_PROXY'] %>
|
https_proxy: <%= ENV['HTTPS_PROXY'] %>
|
||||||
no_proxy: localhost,127.0.0.1
|
no_proxy: localhost,127.0.0.1
|
||||||
|
idempotency_test: true
|
||||||
|
|
||||||
platforms:
|
platforms:
|
||||||
- name: ubuntu-14.04
|
- name: ubuntu-14.04
|
||||||
|
|||||||
@@ -10,13 +10,15 @@
|
|||||||
when: ansible_os_family == 'RedHat'
|
when: ansible_os_family == 'RedHat'
|
||||||
|
|
||||||
- name: Debian - Ensure Java is installed
|
- 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'
|
when: ansible_os_family == 'Debian'
|
||||||
|
|
||||||
- command: java -version 2>&1 | grep OpenJDK
|
- command: java -version 2>&1 | grep OpenJDK
|
||||||
register: open_jdk
|
register: open_jdk
|
||||||
changed_when: false
|
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
|
- name: refresh the java ca-certificates
|
||||||
command: /var/lib/dpkg/info/ca-certificates-java.postinst configure
|
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