Idempotent tests - Make java install idempotent
This commit is contained in:
parent
0973da9c46
commit
946d89ac74
2 changed files with 5 additions and 2 deletions
|
|
@ -12,6 +12,7 @@ provisioner:
|
|||
http_proxy: <%= ENV['HTTP_PROXY'] %>
|
||||
https_proxy: <%= ENV['HTTPS_PROXY'] %>
|
||||
no_proxy: localhost,127.0.0.1
|
||||
idempotency_test: true
|
||||
|
||||
platforms:
|
||||
- name: ubuntu-14.04
|
||||
|
|
|
|||
|
|
@ -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
|
||||
Loading…
Add table
Add a link
Reference in a new issue