Skip to content

Commit fd4a9c9

Browse files
committed
Feat: Allow to download from a login/password protected URL
Signed-off-by: Julien Godin <[email protected]>
1 parent 18cac85 commit fd4a9c9

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

manifests/download.pp

+20
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,23 @@
2828
# @param url
2929
# Full URL
3030
#
31+
# @param username
32+
# Username for the URL
33+
#
34+
# @param password
35+
# Password for the URL
36+
#
3137
# @param jce
3238
# Install Oracles Java Cryptographic Extensions into the JRE or JDK
3339
#
3440
# @param jce_url
3541
# Full URL to the jce zip file
42+
#
43+
# @param jce_username
44+
# Username for the JCE URL
45+
#
46+
# @param jce_password
47+
# Password for the JCE URL
3648
#
3749
# @param basedir
3850
# Directory under which the installation will occur. If not set, defaults to
@@ -62,8 +74,12 @@
6274
Optional[String] $proxy_server = undef,
6375
Optional[Enum['none', 'http', 'https', 'ftp']] $proxy_type = undef,
6476
Optional[String] $url = undef,
77+
Optional[String] $username = undef,
78+
Optional[String] $password = undef,
6579
Boolean $jce = false,
6680
Optional[String] $jce_url = undef,
81+
Optional[String] $jce_username = undef,
82+
Optional[String] $jce_password = undef,
6783
Optional[String] $basedir = undef,
6884
Boolean $manage_basedir = false,
6985
Optional[String] $package_type = undef,
@@ -258,6 +274,8 @@
258274
archive { $destination :
259275
ensure => present,
260276
source => $source,
277+
username => $username,
278+
password => $password,
261279
extract_path => '/tmp',
262280
cleanup => false,
263281
creates => $creates_path,
@@ -309,6 +327,8 @@
309327
extract_path => $jce_path,
310328
extract_flags => '-oj',
311329
creates => "${jce_path}/US_export_policy.jar",
330+
username => $jce_username,
331+
password => $jce_password,
312332
cleanup => false,
313333
proxy_server => $proxy_server,
314334
proxy_type => $proxy_type,

0 commit comments

Comments
 (0)