Skip to content

Commit

Permalink
Merge pull request #217 from idealista/features/216
Browse files Browse the repository at this point in the history
[#216] keystore dir not working as intended
  • Loading branch information
sorobon authored Aug 24, 2023
2 parents c7efd83 + bb19650 commit 49fd4a4
Show file tree
Hide file tree
Showing 23 changed files with 21 additions and 25 deletions.
8 changes: 4 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,11 @@ env:

# Java 11
- DOCKER_IMAGE_BASE=debian:buster-slim DOCKER_TAG_TO_PUBLISH=11-buster-openjdk-headless
- DOCKER_IMAGE_BASE=debian:buster-slim JDK_MAJOR=11 JDK_VERSION=11.0.20+8-1~deb11u1
DOCKER_TAG_TO_PUBLISH=11.0.20-buster-openjdk-headless
- DOCKER_IMAGE_BASE=debian:buster-slim JDK_MAJOR=11 JDK_VERSION=11.0.18+10-1~deb10u1
DOCKER_TAG_TO_PUBLISH=11.0.18-buster-openjdk-headless
- DOCKER_IMAGE_BASE=debian:bullseye-slim DOCKER_TAG_TO_PUBLISH=11-bullseye-openjdk-headless
- DOCKER_IMAGE_BASE=debian:bullseye-slim JDK_MAJOR=11 JDK_VERSION=11.0.18+10-1~deb11u1
DOCKER_TAG_TO_PUBLISH=11.0.18-bullseye-openjdk-headless
- DOCKER_IMAGE_BASE=debian:bullseye-slim JDK_MAJOR=11 JDK_VERSION=11.0.20+8-1~deb11u1
DOCKER_TAG_TO_PUBLISH=11.0.20-bullseye-openjdk-headless
- DOCKER_IMAGE_BASE=debian:bookworm-slim DOCKER_TAG_TO_PUBLISH=11-bookworm-openjdk-headless

- DOCKER_IMAGE_BASE=debian:buster-slim JDK_MAJOR=11 JDK_VENDOR=temurin JDK_VERSION=11.0.20.0.0+8
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,14 @@ All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/) and [Keep a changelog](https://github.com/olivierlacan/keep-a-changelog).

## [Unreleased](https://github.com/idealista/java_role/tree/develop)
# Fixed
- *[#216](https://github.com/idealista/java_role/issues/216) Java keystore dir not working as intended* @sorobon

## [9.0.0](https://github.com/idealista/java_role/tree/9.0.0) (2023-08-16)
### Added
- *[#210](https://github.com/idealista/java_role/issues/210) Temurin support* @sorobon
- *[#210](https://github.com/idealista/java_role/issues/210) Debian 12 support* @sorobon
- *[#210](https://github.com/idealista/java_role/issues/210) Debian 9 support recovered* @sorobon
- *[#210](https://github.com/idealista/java_role/issues/210) Remove deprecated repositories* @sorobon
### Removed
- *[#210](https://github.com/idealista/java_role/issues/210) Removed adoptopenjdk* @sorobon
Expand Down
13 changes: 11 additions & 2 deletions tasks/import_certs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,17 @@
with_items: "{{ check_java_certs.results }}"
when: not item.stat.exists

- name: Java | Setting keystore variables
- name: Java | Setting keystore variables in java < 11
set_fact:
java_keystore_dir: "{{ java_keystore_dir if java_keystore_dir is defined and java_keystore_dir is not sameas None and java_keystore_dir else __java_keystore_dir }}"
java_keystore_dir: "{{ java_keystore_dir if java_keystore_dir is defined and java_keystore_dir is not sameas None and java_keystore_dir else java_keystore_dir_old }}"
when:
- java_open_jdk_version_major | int < 11

- name: Java | Setting keystore variables in java >= 11
set_fact:
java_keystore_dir: "{{ java_keystore_dir if java_keystore_dir is defined and java_keystore_dir is not sameas None and java_keystore_dir else java_keystore_dir_new }}"
when:
- java_open_jdk_version_major | int >= 11

- name: Java | Import SSL certificates
java_cert:
Expand All @@ -23,4 +31,5 @@
keystore_pass: "{{ java_cert_keystore_pass }}"
state: present
cert_alias: "{{ item.java_cert_alias }}"
keystore_create: true
with_items: "{{ java_certs }}"
1 change: 0 additions & 1 deletion vars/corretto/CentOS-8.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
__java_open_jdk_version_major: 1.8.0
__java_keystore_dir: jre/lib/security
# Supported versions: 8 (1.8.0 in RHEL), 11

__java_required_repositories_openjdk:
Expand Down
1 change: 0 additions & 1 deletion vars/corretto/Debian-10.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ java_open_jdk_apt_extra_packages:
- apt-transport-https

__java_open_jdk_version_major: 1.8.0
__java_keystore_dir: jre/lib/security
# Supported versions: 8 (1.8.0L), 11

__java_required_repositories_openjdk:
Expand Down
1 change: 0 additions & 1 deletion vars/corretto/Debian-11.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ java_open_jdk_apt_extra_packages:
- gnupg2

__java_open_jdk_version_major: 1.8.0
__java_keystore_dir: jre/lib/security
# Supported versions: 8 (1.8.0L), 11

__java_required_repositories_openjdk:
Expand Down
1 change: 0 additions & 1 deletion vars/corretto/Debian-12.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ java_open_jdk_apt_extra_packages:
- gnupg2

__java_open_jdk_version_major: 1.8.0
__java_keystore_dir: jre/lib/security
# Supported versions: 8 (1.8.0L), 11

__java_required_repositories_openjdk:
Expand Down
3 changes: 3 additions & 0 deletions vars/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
java_keystore_dir_old: jre/lib/security
java_keystore_dir_new: lib/security
1 change: 0 additions & 1 deletion vars/openjdk/CentOS-7.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

# Using pattern described in Ansible Best Practices and Conventions (Appendix B), Ansible for Devops (p. 406)
__java_open_jdk_version_major: 11
__java_keystore_dir: lib/security
# Supported openjdk major releases: 1.6.0, 1.7.0, 1.8.0, 11
#
__java_required_repositories_openjdk: []
Expand Down
1 change: 0 additions & 1 deletion vars/openjdk/CentOS-8.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

# Using pattern described in Ansible Best Practices and Conventions (Appendix B), Ansible for Devops (p. 406)
__java_open_jdk_version_major: 11
__java_keystore_dir: lib/security
# Supported openjdk major releases: 1.8.0, 11

__java_required_repositories_openjdk: []
Expand Down
1 change: 0 additions & 1 deletion vars/openjdk/Debian-10.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

# Using pattern described in Ansible Best Practices and Conventions (Appendix B), Ansible for Devops (p. 406)
__java_open_jdk_version_major: 11
__java_keystore_dir: lib/security
# Supported openjdk major releases: 11

__java_required_repositories_openjdk: []
Expand Down
1 change: 0 additions & 1 deletion vars/openjdk/Debian-11.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

# Using pattern described in Ansible Best Practices and Conventions (Appendix B), Ansible for Devops (p. 406)
__java_open_jdk_version_major: 11
__java_keystore_dir: lib/security
# Supported openjdk major releases: 11, 17

__java_required_repositories_openjdk: []
Expand Down
1 change: 0 additions & 1 deletion vars/openjdk/Debian-12.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

# Using pattern described in Ansible Best Practices and Conventions (Appendix B), Ansible for Devops (p. 406)
__java_open_jdk_version_major: 17
__java_keystore_dir: lib/security
# Supported openjdk major releases: 11, 17

__java_required_repositories_openjdk: []
Expand Down
1 change: 0 additions & 1 deletion vars/openjdk/Debian-9.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

# Using pattern described in Ansible Best Practices and Conventions (Appendix B), Ansible for Devops (p. 406)
__java_open_jdk_version_major: 11
__java_keystore_dir: lib/security
# Supported openjdk major releases: 11

__java_required_repositories_openjdk: "deb http://archive.debian.org/debian stretch-backports main"
Expand Down
1 change: 0 additions & 1 deletion vars/openjdk/Ubuntu-18.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ java_open_jdk_apt_extra_packages:

# Using pattern described in Ansible Best Practices and Conventions (Appendix B), Ansible for Devops (p. 406)
__java_open_jdk_version_major: 11
__java_keystore_dir: lib/security
# Supported openjdk major releases: 8, 11

__java_required_repositories_openjdk: []
Expand Down
1 change: 0 additions & 1 deletion vars/openjdk/Ubuntu-20.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ java_open_jdk_apt_extra_packages:
- gnupg2
# Using pattern described in Ansible Best Practices and Conventions (Appendix B), Ansible for Devops (p. 406)
__java_open_jdk_version_major: 17
__java_keystore_dir: lib/security
# Supported openjdk major releases: 8, 11, 13, 14, 17

__java_required_repositories_openjdk: []
Expand Down
1 change: 0 additions & 1 deletion vars/openjdk/Ubuntu-22.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ java_open_jdk_apt_extra_packages:
- gnupg2
# Using pattern described in Ansible Best Practices and Conventions (Appendix B), Ansible for Devops (p. 406)
__java_open_jdk_version_major: 17
__java_keystore_dir: lib/security
# Supported openjdk major releases: 8, 11, 17, 18

__java_required_repositories_openjdk: []
Expand Down
1 change: 0 additions & 1 deletion vars/temurin/Debian-10.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ java_open_jdk_apt_extra_packages:
- python-apt
- apt-transport-https
__java_open_jdk_version_major: 8
__java_keystore_dir: jre/lib/security
# Supported major releases: 8 and from 11 to 14; hotspot and openj9 implementations

# For Debian family
Expand Down
1 change: 0 additions & 1 deletion vars/temurin/Debian-11.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ java_open_jdk_apt_extra_packages:
- apt-transport-https
- gnupg2
__java_open_jdk_version_major: 8
__java_keystore_dir: jre/lib/security
# Supported major releases: 8 and from 11 to 14; hotspot and openj9 implementations

# For Debian family
Expand Down
1 change: 0 additions & 1 deletion vars/temurin/Debian-12.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ java_open_jdk_apt_extra_packages:
- apt-transport-https
- gnupg2
__java_open_jdk_version_major: 8
__java_keystore_dir: jre/lib/security
# Supported major releases: 8 and from 11 to 14; hotspot and openj9 implementations

# For Debian family
Expand Down
1 change: 0 additions & 1 deletion vars/temurin/Debian-9.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ java_open_jdk_apt_extra_packages:
- python-apt
- apt-transport-https
__java_open_jdk_version_major: 8
__java_keystore_dir: jre/lib/security
# Supported major releases: 8 and from 11 to 14; hotspot and openj9 implementations

# For Debian family
Expand Down
1 change: 0 additions & 1 deletion vars/temurin/Ubuntu-20.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ java_open_jdk_apt_extra_packages:
- apt-transport-https
- gnupg2
__java_open_jdk_version_major: 8
__java_keystore_dir: jre/lib/security
# Supported major releases: 8 and from 11 to 14; hotspot and openj9 implementations

__java_required_libs_openjdk: []
Expand Down
1 change: 0 additions & 1 deletion vars/temurin/Ubuntu-22.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ java_open_jdk_apt_extra_packages:
- apt-transport-https
- gnupg2
__java_open_jdk_version_major: 8
__java_keystore_dir: jre/lib/security
# Supported major releases: 8 and from 11 to 14; hotspot and openj9 implementations

__java_required_libs_openjdk: []
Expand Down

0 comments on commit 49fd4a4

Please sign in to comment.