|
13 | 13 | # Major version which should be installed, e.g. '8u101' or '9.0.4'. Must be used together with version_minor. |
14 | 14 | # |
15 | 15 | # @param version_minor |
16 | | -# Minor version which should be installed, e.g. 'b12' (for version = '8') or '11' (for version != '8'). Must be used together with version_major. |
| 16 | +# Minor version which should be installed, e.g. 'b12' (for version = '8') or '11' (for version != '8'). |
| 17 | +# Must be used together with version_major. |
17 | 18 | # |
18 | 19 | # @param java |
19 | 20 | # Type of Java Standard Edition to install, jdk or jre. |
|
32 | 33 | # /usr/lib/jvm for Debian and /usr/java for RedHat. |
33 | 34 | # |
34 | 35 | # @param manage_basedir |
35 | | -# Whether to manage the basedir directory. Defaults to false. |
| 36 | +# Whether to manage the basedir directory. |
36 | 37 | # Note: /usr/lib/jvm is managed for Debian by default, separate from this parameter. |
37 | 38 | # |
38 | 39 | # @param package_type |
|
47 | 48 | # The name for the optional symlink in the installation directory. |
48 | 49 | # |
49 | 50 | define java::adopt ( |
50 | | - $ensure = 'present', |
51 | | - $version = '8', |
52 | | - $version_major = undef, |
53 | | - $version_minor = undef, |
54 | | - $java = 'jdk', |
55 | | - $proxy_server = undef, |
56 | | - $proxy_type = undef, |
57 | | - $url = undef, |
58 | | - $basedir = undef, |
59 | | - $manage_basedir = true, |
60 | | - $package_type = undef, |
61 | | - $manage_symlink = false, |
62 | | - $symlink_name = undef, |
| 51 | + String[1] $ensure = 'present', |
| 52 | + String[1] $version = '8', |
| 53 | + Optional[String] $version_major = undef, |
| 54 | + Optional[String] $version_minor = undef, |
| 55 | + String $java = 'jdk', |
| 56 | + Optional[String] $proxy_server = undef, |
| 57 | + Optional[String] $proxy_type = undef, |
| 58 | + Optional[String] $url = undef, |
| 59 | + Optional[String] $basedir = undef, |
| 60 | + Boolean $manage_basedir = true, |
| 61 | + Optional[String] $package_type = undef, |
| 62 | + Boolean $manage_symlink = false, |
| 63 | + Optional[String] $symlink_name = undef, |
63 | 64 | ) { |
64 | 65 | # archive module is used to download the java package |
65 | | - include ::archive |
| 66 | + include archive |
66 | 67 |
|
67 | 68 | # validate java Standard Edition to download |
68 | 69 | if $java !~ /(jre|jdk)/ { |
|
188 | 189 |
|
189 | 190 | # set java architecture nomenclature |
190 | 191 | $os_architecture = $facts['os']['architecture'] ? { |
191 | | - undef => $facts['architecture'], |
192 | 192 | default => $facts['os']['architecture'] |
193 | 193 | } |
194 | 194 |
|
|
0 commit comments