diff --git a/README.md b/README.md index 5f45b63..7f84b4a 100644 --- a/README.md +++ b/README.md @@ -52,9 +52,9 @@ are shown below): ```yaml # Java version number -# Specify '8', '11', '17' or '21' to get the latest patch version of that +# Specify '8', '11', '17', '21' or '23' to get the latest patch version of that # release. -java_version: '21.0.2+13' +java_version: '21.0.5+11' # Base installation directory for any Java distribution java_install_dir: '/opt/java' @@ -118,7 +118,7 @@ You can install a specific version of the JDK by specifying the `java_version`. - hosts: servers roles: - role: gantsign.java - java_version: '8.0.402+6' + java_version: '8.0.432+6' ``` **Note:** with [curl](https://curl.haxx.se) and @@ -126,7 +126,7 @@ You can install a specific version of the JDK by specifying the `java_version`. running the following command: ```bash -for i in 21 17 11 8; do (curl --silent http \ +for i in 23 21 17 11 8; do (curl --silent http \ "https://api.adoptium.net/v3/info/release_names?version=%5B$i,$(($i + 1)))\ &release_type=ga" | jq --raw-output '.releases[]' | sed -E 's/^jdk\-?//'); done ``` @@ -150,20 +150,20 @@ once: To perform an offline install, you need to specify a bit more information (i.e. `java_major_version`, `java_release_name`, `java_redis_filename` and -`java_redis_sha256sum`). E.g. to perform an offline install of `11.0.22+7`: +`java_redis_sha256sum`). E.g. to perform an offline install of `11.0.25+9`: ```yaml # Before performing the offline install, download -# `OpenJDK11U-jdk_x64_linux_hotspot_11.0.22_7.tar.gz` to +# `OpenJDK11U-jdk_x64_linux_hotspot_11.0.25_9.tar.gz` to # `{{ playbook_dir }}/files/` on the local machine. - hosts: servers roles: - role: gantsign.java java_major_version: '11' - java_version: '11.0.22+7' - java_release_name: 'jdk-11.0.22+7' - java_redis_filename: 'OpenJDK11U-jdk_x64_linux_hotspot_11.0.22_7.tar.gz' - java_redis_sha256sum: '25cf602cac350ef36067560a4e8042919f3be973d419eac4d839e2e0000b2cc8' + java_version: '11.0.25+9' + java_release_name: 'jdk-11.0.25+9' + java_redis_filename: 'OpenJDK11U-jdk_x64_linux_hotspot_11.0.25_9.tar.gz' + java_redis_sha256sum: '191baa2e052627614022171400a917d28f0987dc54da48aaf07b06f552bb9884' ``` Role Facts diff --git a/defaults/main.yml b/defaults/main.yml index 53e1e36..427597c 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -1,9 +1,9 @@ # code: language=ansible --- # Java version number -# Specify '8', '11', '17' or '21' to get the latest patch version of that +# Specify '8', '11', '17', '21' or '23' to get the latest patch version of that # release. -java_version: '21.0.2+13' +java_version: '21.0.5+11' # Base installation directory for any Java distribution java_install_dir: '/opt/java' diff --git a/molecule/java-max-lts-offline/converge.yml b/molecule/java-max-lts-offline/converge.yml index fd7c19c..24db1a7 100644 --- a/molecule/java-max-lts-offline/converge.yml +++ b/molecule/java-max-lts-offline/converge.yml @@ -26,8 +26,8 @@ - name: Download JDK for offline install ansible.builtin.get_url: - url: "https://api.adoptium.net/v3/binary/version/{{ 'jdk-21.0.2+13' | urlencode }}/linux/x64/jdk/hotspot/normal/adoptium?project=jdk" # noqa 204 - dest: '{{ java_local_archive_dir }}/OpenJDK21-jdk_x64_linux_hotspot_21.0.2_13.tar.gz' + url: "https://api.adoptium.net/v3/binary/version/{{ 'jdk-21.0.5+11' | urlencode }}/linux/x64/jdk/hotspot/normal/adoptium?project=jdk" # noqa 204 + dest: '{{ java_local_archive_dir }}/OpenJDK21-jdk_x64_linux_hotspot_21.0.5_11.tar.gz' force: false timeout: '{{ java_download_timeout_seconds }}' mode: 'u=rw,go=r' @@ -37,11 +37,11 @@ - role: ansible-role-java java_use_local_archive: true java_major_version: '21' - java_version: '21.0.2+13' - java_release_name: 'jdk-21.0.2+13' + java_version: '21.0.5+11' + java_release_name: 'jdk-21.0.5+11' - java_redis_filename: 'OpenJDK21-jdk_x64_linux_hotspot_21.0.2_13.tar.gz' - java_redis_sha256sum: '454bebb2c9fe48d981341461ffb6bf1017c7b7c6e15c6b0c29b959194ba3aaa5' + java_redis_filename: 'OpenJDK21-jdk_x64_linux_hotspot_21.0.5_11.tar.gz' + java_redis_sha256sum: '3c654d98404c073b8a7e66bffb27f4ae3e7ede47d13284c132d40a83144bfd8c' post_tasks: - name: Verify java facts diff --git a/molecule/java-max-non-lts-offline/converge.yml b/molecule/java-max-non-lts-offline/converge.yml index 7baeb40..e589ebd 100644 --- a/molecule/java-max-non-lts-offline/converge.yml +++ b/molecule/java-max-non-lts-offline/converge.yml @@ -26,8 +26,8 @@ - name: Download JDK for offline install ansible.builtin.get_url: - url: "https://api.adoptium.net/v3/binary/version/{{ 'jdk-20.0.2+9' | urlencode }}/linux/x64/jdk/hotspot/normal/adoptium?project=jdk" # noqa 204 - dest: '{{ java_local_archive_dir }}/OpenJDK20-jdk_x64_linux_hotspot_20.0.2_9.tar.gz' + url: "https://api.adoptium.net/v3/binary/version/{{ 'jdk-23.0.1+11' | urlencode }}/linux/x64/jdk/hotspot/normal/adoptium?project=jdk" # noqa 204 + dest: '{{ java_local_archive_dir }}/OpenJDK23-jdk_x64_linux_hotspot_23.0.1_11.tar.gz' force: false timeout: '{{ java_download_timeout_seconds }}' mode: 'u=rw,go=r' @@ -36,11 +36,11 @@ roles: - role: ansible-role-java java_use_local_archive: true - java_major_version: '20' - java_version: '20.0.2+9' - java_release_name: 'jdk-20.0.2+9' - java_redis_filename: 'OpenJDK20-jdk_x64_linux_hotspot_20.0.2_9.tar.gz' - java_redis_sha256sum: '3d91842e9c172967ac397076523249d05a82ead51b0006838f5f0315ad52222c' + java_major_version: '23' + java_version: '23.0.1+11' + java_release_name: 'jdk-23.0.1+11' + java_redis_filename: 'OpenJDK23-jdk_x64_linux_hotspot_23.0.1_11.tar.gz' + java_redis_sha256sum: '2400267e4e9c0f6ae880a4d763af6caf18c673714bdee5debf8388b0b5d52886' post_tasks: - name: Verify java facts diff --git a/molecule/java-max-non-lts-online/converge.yml b/molecule/java-max-non-lts-online/converge.yml index ac2a186..f9ef617 100644 --- a/molecule/java-max-non-lts-online/converge.yml +++ b/molecule/java-max-non-lts-online/converge.yml @@ -19,7 +19,7 @@ roles: - role: ansible-role-java - java_version: '20' + java_version: '23' java_use_local_archive: false post_tasks: diff --git a/molecule/java-max-non-lts/tests/test_role.py b/molecule/java-max-non-lts/tests/test_role.py index 134c3fc..87e434e 100644 --- a/molecule/java-max-non-lts/tests/test_role.py +++ b/molecule/java-max-non-lts/tests/test_role.py @@ -8,7 +8,7 @@ def test_java(host): m = re.search('(?:java|openjdk) version "([0-9]+)', cmd.stderr) assert m is not None java_version = m.group(1) - assert '20' == java_version + assert '23' == java_version def test_javac(host): @@ -17,11 +17,11 @@ def test_javac(host): m = re.search('javac ([0-9]+)', cmd.stdout) assert m is not None java_version = m.group(1) - assert '20' == java_version + assert '23' == java_version @pytest.mark.parametrize('version_dir_pattern', [ - 'jdk-20(\\.[0-9]+\\.[0-9]+)?(\\+[0-9]+)?$' + 'jdk-23(\\.[0-9]+\\.[0-9]+)?(\\+[0-9]+)?$' ]) def test_java_installed(host, version_dir_pattern): diff --git a/molecule/java-min-offline/converge.yml b/molecule/java-min-offline/converge.yml index 5e49082..a70ad0f 100644 --- a/molecule/java-min-offline/converge.yml +++ b/molecule/java-min-offline/converge.yml @@ -27,8 +27,8 @@ - name: Download JDK for offline install ansible.builtin.get_url: - url: 'https://github.com/adoptium/temurin8-binaries/releases/download/jdk8u402-b06/OpenJDK8U-jdk_x64_linux_hotspot_8u402b06.tar.gz' - dest: '{{ java_local_archive_dir }}/OpenJDK8U-jdk_x64_linux_hotspot_8u402b06.tar.gz' + url: 'https://github.com/adoptium/temurin8-binaries/releases/download/jdk8u432-b06/OpenJDK8U-jdk_x64_linux_hotspot_8u432b06.tar.gz' + dest: '{{ java_local_archive_dir }}/OpenJDK8U-jdk_x64_linux_hotspot_8u432b06.tar.gz' force: false use_proxy: true validate_certs: true @@ -40,11 +40,11 @@ roles: - role: ansible-role-java java_major_version: '8' - java_version: '8.0.402+6' - java_release_name: 'jdk8u402-b06' + java_version: '8.0.432+6' + java_release_name: 'jdk8u432-b06' java_use_local_archive: true - java_redis_filename: 'OpenJDK8U-jdk_x64_linux_hotspot_8u402b06.tar.gz' - java_redis_sha256sum: 'fcfd08abe39f18e719e391f2fc37b8ac1053075426d10efac4cbf8969e7aa55e' + java_redis_filename: 'OpenJDK8U-jdk_x64_linux_hotspot_8u432b06.tar.gz' + java_redis_sha256sum: 'abaaa90deadf51bd28921453baf2992b3dff6171bb7142f5bdd14ef269f7b245' post_tasks: - name: Verify java facts diff --git a/molecule/java-min-online/converge.yml b/molecule/java-min-online/converge.yml index aa12689..569462f 100644 --- a/molecule/java-min-online/converge.yml +++ b/molecule/java-min-online/converge.yml @@ -19,7 +19,7 @@ roles: - role: ansible-role-java - java_version: 8.0.402+6 + java_version: 8.0.432+6 java_use_local_archive: false post_tasks: diff --git a/molecule/java-old-lts-offline/converge.yml b/molecule/java-old-lts-offline/converge.yml index 64345e5..de371df 100644 --- a/molecule/java-old-lts-offline/converge.yml +++ b/molecule/java-old-lts-offline/converge.yml @@ -26,8 +26,8 @@ - name: Download JDK for offline install ansible.builtin.get_url: - url: "https://api.adoptium.net/v3/binary/version/{{ 'jdk-11.0.22+7' | urlencode }}/linux/x64/jdk/hotspot/normal/adoptium?project=jdk" # noqa 204 - dest: '{{ java_local_archive_dir }}/OpenJDK11U-jdk_x64_linux_hotspot_11.0.22_7.tar.gz' + url: "https://api.adoptium.net/v3/binary/version/{{ 'jdk-11.0.25+9' | urlencode }}/linux/x64/jdk/hotspot/normal/adoptium?project=jdk" # noqa 204 + dest: '{{ java_local_archive_dir }}/OpenJDK11U-jdk_x64_linux_hotspot_11.0.25_9.tar.gz' force: false timeout: '{{ java_download_timeout_seconds }}' mode: 'u=rw,go=r' @@ -37,10 +37,10 @@ - role: ansible-role-java java_use_local_archive: true java_major_version: '11' - java_version: '11.0.22+7' - java_release_name: 'jdk-11.0.22+7' - java_redis_filename: 'OpenJDK11U-jdk_x64_linux_hotspot_11.0.22_7.tar.gz' - java_redis_sha256sum: '25cf602cac350ef36067560a4e8042919f3be973d419eac4d839e2e0000b2cc8' + java_version: '11.0.25+9' + java_release_name: 'jdk-11.0.25+9' + java_redis_filename: 'OpenJDK11U-jdk_x64_linux_hotspot_11.0.25_9.tar.gz' + java_redis_sha256sum: '191baa2e052627614022171400a917d28f0987dc54da48aaf07b06f552bb9884' post_tasks: - name: Verify java facts