You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: roles/prereq_jdk/README.md
+13Lines changed: 13 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,16 +4,20 @@ Set up JDK
4
4
5
5
This role automates the setup of a Java Development Kit (JDK) on a host. It can optionally install the JDK packages from various providers (OpenJDK, Oracle, Azul), handle version management, and perform post-installation configuration. For older JDK versions (9 and below), it can also enable the Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy to support stronger encryption.
6
6
7
+
This role also verifies the JDK on target host against the official Cloudera on-premises support matrix, which is available at [supportmatrix.cloudera.com/](https://supportmatrix.cloudera.com). It is designed to be run early in a deployment pipeline to ensure that the environment meets the JDK prerequisites before proceeding with the installation of Cloudera products.
8
+
7
9
The role will:
8
10
- Install the specified JDK packages if `jdk_install_packages` is `true`.
9
11
- For JDK versions 8 and below, it will apply the JCE Unlimited Strength Jurisdiction Policy if needed, by modifying `java.security` files.
10
12
- If multiple `java.security` files are found during JCE configuration, it will either proceed or halt based on the `jdk_security_paths_override` flag.
11
13
- For JDKs installed from Cloudera's repository, the role will ensure that any missing symbolic links are created to support a consistent JDK installation path.
14
+
- Compare JDK against the support matrix at [supportmatrix.cloudera.com/](https://supportmatrix.cloudera.com) for the specified versions of Cloudera Manager and Cloudera Runtime.
12
15
13
16
# Requirements
14
17
15
18
- Root or `sudo` privileges are required to install packages and modify system-wide configuration files.
16
19
- Network access to the package repositories for the chosen JDK provider.
20
+
- Access to the [supportmatrix.cloudera.com/](https://supportmatrix.cloudera.com) site.
17
21
18
22
# Dependencies
19
23
@@ -29,6 +33,8 @@ None.
29
33
|`jdk_version`|`int`|`False`|`17`| The supported JDK version to install. Valid choices are `8`, `11`, and `17`. |
30
34
|`jdk_security_paths`|`list` of `path`|`False`| - | A list of paths to search for `java.security` files. The role will only apply JCE changes to files in these locations. |
31
35
|`jdk_security_paths_override`|`bool`|`False`|`False`| Flag to control behavior when multiple `java.security` files are found in the specified paths. If `true`, the role will continue with JCE changes even if multiple files are found. If `false`, the role will fail, requiring a more specific path list. |
36
+
|`cloudera_manager_version`|`str`|`True`|| The version of Cloudera Manager to validate against. |
37
+
|`cloudera_runtime_version`|`str`|`True`|| The version of Cloudera Runtime to validate against. |
32
38
33
39
# Example Playbook
34
40
@@ -38,6 +44,9 @@ None.
38
44
- name: Set up default OpenJDK 17 installation
39
45
ansible.builtin.import_role:
40
46
name: cloudera.exe.prereq_jdk
47
+
vars:
48
+
cloudera_manager_version: "7.11.3"
49
+
cloudera_runtime_version: "7.1.9"
41
50
# All variables will use their defaults, installing OpenJDK 17.
42
51
43
52
- name: Set up Oracle JDK 11 without installing packages
@@ -47,6 +56,8 @@ None.
47
56
jdk_provider: oracle
48
57
jdk_version: 11
49
58
jdk_install_packages: false # Assume JDK 11 is already installed
0 commit comments