Skip to content

add adjustable timeout for various download-related Execs #54

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
9 changes: 7 additions & 2 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@
# String. Specifies if jdk should be installed or absent
# Defaults to <tt>installed</tt>.
#
# [ *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' ),
Expand All @@ -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'
) {

Expand Down Expand Up @@ -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'],
}

Expand Down Expand Up @@ -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'],
}

Expand Down