diff --git a/README.md b/README.md index 3b5e86a..37a734b 100644 --- a/README.md +++ b/README.md @@ -109,5 +109,7 @@ site.pp: * Boolean to optionally install Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files (Java 8 only) * default_java * Boolean to indicate if the installed java version is linked as the default java, javac etc... +* timeout + * Integer or String. Adjust timeout for various downloads. * ensure * Boolean to disable anything from happening (absent/removal not supported yet) diff --git a/manifests/init.pp b/manifests/init.pp index 8ea4cd8..682e867 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -42,6 +42,10 @@ # String. Specifies if jdk should be installed or absent # Defaults to installed. # +# [ *timeout * ] +# Integer or String. Adjust timeout for various downloads. +# Defaults to 600 seconds. +# class jdk_oracle( $version = hiera('jdk_oracle::version', '8' ), $version_update = hiera('jdk_oracle::version_update', 'default' ), @@ -52,6 +56,7 @@ $platform = hiera('jdk_oracle::platform', 'x64' ), $jce = hiera('jdk_oracle::jce', false ), $default_java = hiera('jdk_oracle::default_java', true ), + $timeout = hiera('jdk_oracle::timeout', 600), $ensure = 'installed' ) { @@ -144,7 +149,7 @@ cwd => $install_dir, creates => "${install_dir}/${installerFilename}", command => "wget -c --no-cookies --no-check-certificate --header \"Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com\" --header \"Cookie: oraclelicense=accept-securebackup-cookie\" \"${javaDownloadURI}\" -O ${installerFilename}", - timeout => 600, + timeout => $timeout, require => Package['wget'], } @@ -285,7 +290,7 @@ cwd => $install_dir, creates => "${install_dir}/${jceFilename}", command => "wget -c --no-cookies --no-check-certificate --header \"Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com\" --header \"Cookie: oraclelicense=accept-securebackup-cookie\" \"${jceDownloadURI}\" -O ${jceFilename}", - timeout => 600, + timeout => $timeout, require => Package['wget'], }